Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C timerfd_在amd64上使用debian linux测试创建_C_Linux_Timer_Debian - Fatal编程技术网

C timerfd_在amd64上使用debian linux测试创建

C timerfd_在amd64上使用debian linux测试创建,c,linux,timer,debian,C,Linux,Timer,Debian,我试图在Debian Linux lenny下使用timerfd_create和timerfd_settime。手册页显示包含。在我的系统上找不到此文件。根据Debian包搜索,只有带有timerfd.h的包是linux头-*包 我已经安装了包linux-headers-2.6.26-1-amd64和linux-headers-2.6.26-1-common。我尝试包含/lib/modules/2.6.26-1-amd64/build/include/linux/timerfd.h文件(不包括)

我试图在Debian Linux lenny下使用timerfd_create和timerfd_settime。手册页显示包含
。在我的系统上找不到此文件。根据Debian包搜索,只有带有timerfd.h的包是linux头-*包

我已经安装了包linux-headers-2.6.26-1-amd64和linux-headers-2.6.26-1-common。我尝试包含/lib/modules/2.6.26-1-amd64/build/include/linux/timerfd.h文件(不包括
)。但是我得到了以下链接器错误:
slave.c:(.text+0x166):对
timerfd\u ceate的未定义引用
slave.c:(.text+0x1e5):未定义对
timerfd\u settime的引用

我的构建命令是gcc-osave.c-L../libs-lcan-lutils-lrt

can和utils库是我自己的。它们中没有一个使用或定义一个timerfd_*函数。我尝试了-lrt,因为timer\u create和timer\u settimer需要它,即使它不在手册页中。带有timer_create和timer_settimer的测试程序工作正常,符合预期

我需要安装什么数据包,我需要链接到什么库,我需要使用timerfd_create和timerfd_settimer包含哪些文件

谢谢
Edger

对这些功能的支持在linux和glibc中是新的,您需要linux内核2.6.25或更高版本的glibc 2.8或更高版本。

作为旁注,在google上遇到了这个问题,完全解决了我的问题,谢谢!