/* ** This happens because as you can read in the _syscall manpage : ** ** NOTES ** Starting around kernel 2.6.18, the _syscall macros were removed from header ** files supplied to user space. Use syscall(2) instead. (Some architectures, ** notably ia64, never provided the _syscall macros; on those architectures, ** syscall(2) was always required.) ** ** so you got this compilation error : ** a.c:7: error: expected declaration specifiers or ‘...’ before ‘epoll_create’ ** a.c:7: error: expected declaration specifiers or ‘...’ before ‘size’ ** a.c:7: warning: data definition has no type or storage class ** ** It means after epoll_create and size are not valids type's specifier. ** This is because _syscall1 is not defined and thus it take it for a ** prototype, so epoll_create would be some data type. ** ** The solution is to include the little _syscall.h that define it. ** man epoll_create do it for me, anyway. */ #include #include #include "_syscall.h" #define __NR_epoll_create 254 _syscall1(int, epoll_create, int, size)