| 100 | | flags << '-DHAVE_EPOLL' if have_header('sys/epoll.h') |
|---|
| | 100 | # Original epoll test is inadequate because 2.4 kernels have the header |
|---|
| | 101 | # but not the code. |
|---|
| | 102 | #flags << '-DHAVE_EPOLL' if have_header('sys/epoll.h') |
|---|
| | 103 | if have_header('sys/epoll.h') |
|---|
| | 104 | File.open("hasEpollTest.c", "w") {|f| |
|---|
| | 105 | f.puts "#include <sys/epoll.h>" |
|---|
| | 106 | f.puts "void X() { epoll_create(1024); }" |
|---|
| | 107 | } |
|---|
| | 108 | e = `gcc hasEpollTest.c -o hasEpollTest 2> /dev/null` |
|---|
| | 109 | `rm -f hasEpollTest.c hasEpollTest` |
|---|
| | 110 | flags << '-DHAVE_EPOLL' if e == 0 |
|---|
| | 111 | end |
|---|