Re: How can I use epoll?

From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 07/18/03


Date: Fri, 18 Jul 2003 09:41:00 +0200

Cho Wooyoung wrote:
>
> I upgraded the kernel to 2.6-test and tried to compile small code following.
> ------------------------
> #include <stdint.h>
> #include <sys/epoll.h>
>
> int main()
> {
> int fd;
> fd = epoll_create(5);
> printf("%d\n",fd);
> }
> -------------------------
>
> But I got error message.
> ----------------------------------------------
> [newhero@retest00 epoll]$ gcc epoll.c
> /tmp/ccCDEU9Q.o(.text+0x16): In function `main':
> : undefined reference to `epoll_create'
> collect2: ld returned 1 exit status
> ----------------------------------------------
>
> How can I use epoll system calls?

Upgrade libc to a version with epoll support.
Or add it to your own code like this:

#include <asm/unistd.h>
static inline _syscall1(int,epoll_create,int);

-- 
Kasper Dupont -- der bruger for meget tid paa usenet.
For sending spam use mailto:aaarep@daimi.au.dk
This reply intentionally does not answer the question completely.


Relevant Pages

  • sed problem
    ... Once upon a time I manage to upgrade one of my FreeBSD servers to some ... found out that the sed command in MKib_gen.sh script does not behave as ... int something-> int gen_something ... I copied the sed binary from the working system over to this broken ...
    (freebsd-questions)
  • [patch 6/6] make page table upgrade work again
    ... upgrade of a 64 bit process from 3 to 4 levels of page table needs ... +int s390_mmap_check ... unsigned long len, unsigned long pgoff, unsigned long flags) ...
    (Linux-Kernel)
  • Re: ctypes - python2.7.3 vs python3.2.3
    ... On 28/08/2012 22:35, Rolf wrote: ... when I upgrade to python3.2.3 things don't seem to work right. ... int main; ... so the address becomes a dangling pointer. ...
    (comp.lang.python)
  • Segfault on new?
    ... I have a really simple program that illustrates a problem I'm ... an upgrade is in the works). ... Anywho, I have ... int main ...
    (microsoft.public.vc.language)