Do not reinvent eventfd. Won't work if syscall.h is old.
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Thu, 5 Feb 2009 15:26:33 +0000 (17:26 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Thu, 5 Feb 2009 15:27:15 +0000 (17:27 +0200)
src/misc/objects.c

index 2fe3206..1795c3e 100644 (file)
 
 #include <assert.h>
 
-#ifdef __linux__
-# if defined (HAVE_SYS_EVENTFD_H)
-#  include <sys/eventfd.h>
-# else
-#  include <sys/syscall.h>
-static inline int eventfd (unsigned int initval, int flags)
-{
-    return syscall (SYS_eventfd, initval, flags);
-}
-# endif
+#if defined (HAVE_SYS_EVENTFD_H)
+# include <sys/eventfd.h>
 # define HAVE_EVENTFD 1
 #endif