]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/perl/UCW/Configure/LibUCW.pm
Main: Unified support for poll and epoll
[libucw.git] / ucw / perl / UCW / Configure / LibUCW.pm
index 5969e383fee6b52fcaaa4ede1eb99d55de2e2437..c40b1cac5e25d5a727c960daade29e6b24710d3e 100644 (file)
@@ -54,6 +54,18 @@ if (Get("CONFIG_UCW_THREADS")) {
        });
 }
 
+# Detect if we have the epoll() syscall
+TestBool("CONFIG_UCW_EPOLL", "Checking for epoll", sub {
+       return UCW::Configure::C::TestCompile("epoll", <<'FINIS' ) ? 1 : 0;
+#include <sys/epoll.h>
+int main(void)
+{
+       epoll_create(256);
+       return 0;
+}
+FINIS
+});
+
 PostConfig {
        AtWrite {
                UCW::Configure::C::ConfigHeader("ucw/autoconf.h", [