ソースを参照

core: fix some #includes to be posix compliant

sys/poll.h and sys/fcntl.h are GNUisms and might not exist on
strictly posix compliant systems. This fixes to use the posix
specified standard locations of these headers.

E.g musl c-library will give warnings on using these non-standard
glibc 'internal' headers.

(cherry picked from commit 2c74ba02c843349a6ad30f7e668a7a194dac679c)
(cherry picked from commit ad169fc1c3a207670c4f3615258e3637127982d5)
Timo Teräs 11 年 前
コミット
05fca1e54d
3 ファイル変更3 行追加3 行削除
  1. 1 1
      io_wait.h
  2. 1 1
      stats.h
  3. 1 1
      tcp_main.c

+ 1 - 1
io_wait.h

@@ -63,7 +63,7 @@
 #endif
 
 #define _GNU_SOURCE  /* for POLLRDHUP on linux */
-#include <sys/poll.h>
+#include <poll.h>
 #include <fcntl.h>
 
 #ifdef HAVE_EPOLL

+ 1 - 1
stats.h

@@ -32,7 +32,7 @@
 
 #include <ctype.h>
 #include <sys/mman.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/time.h>
 #include <time.h>
 #include <sys/utsname.h>

+ 1 - 1
tcp_main.c

@@ -150,7 +150,7 @@
 #ifdef HAVE_SELECT
 #include <sys/select.h>
 #endif
-#include <sys/poll.h>
+#include <poll.h>
 
 
 #include "ip_addr.h"