epoll on older glibc

Thanos Chatziathanassiou tchatzi at arx.net
Thu Apr 3 18:10:20 MSD 2008


I've run accross a linux server based off glibc-2.2.5 and running a 
2.6(.16.60) kernel.
epoll wasn't a part of glibc back in those days, instead there was 
libepoll which pretty much works the same way.

I've run into some trouble making nginx aware of the availability of 
epoll in this configuration
---snip autoconf.err---
checking for epoll

/tmp/ccFpeJ2A.o: In function `main':
autotest.c:(.text+0x22): undefined reference to `epoll_create'
collect2: ld returned exit status 1
----------

#include <sys/types.h>
#include <unistd.h>
#include <sys/epoll.h>

int main() {
     int efd = 0, fd = 1, n;
                   struct epoll_event ee;
                   ee.events = EPOLLIN|EPOLLOUT|EPOLLET;
                   ee.data.ptr = NULL;
                   efd = epoll_create(100);
                   if (efd == -1) return 1;;
     return 0;
}
---snip---
, but eventually it was as simple as:
``./configure ..various options.. --with-ld-opt=-lepoll''.

While I suspect that most (all ?) users with reasonably current set-ups 
won't ever need this, is there a way for configure to figure this out on 
its own ?

Best Regards,
Thanos Chatziathanassiou







More information about the nginx mailing list