Browse Source

perf tools: Don't include sys/poll.h directly

Include poll.h instead.

Fixes the following warning in systems with musl's libc:

  /usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include
  <sys/poll.h> to <poll.h> [-Wcpp]

Reported-by: John Spencer <maillist-linux@barfooze.de>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://thread.gmane.org/gmane.linux.kernel.perf.user/1687/focus=1690
Link: http://lkml.kernel.org/n/tip-k4ocrq1de3fk146oevy346bi@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo 11 years ago
parent
commit
a8fa496092
3 changed files with 3 additions and 3 deletions
  1. 1 1
      tools/perf/bench/sched-messaging.c
  2. 1 1
      tools/perf/builtin-top.c
  3. 1 1
      tools/perf/util/util.h

+ 1 - 1
tools/perf/bench/sched-messaging.c

@@ -26,7 +26,7 @@
 #include <sys/socket.h>
 #include <sys/socket.h>
 #include <sys/wait.h>
 #include <sys/wait.h>
 #include <sys/time.h>
 #include <sys/time.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <limits.h>
 #include <limits.h>
 #include <err.h>
 #include <err.h>
 
 

+ 1 - 1
tools/perf/builtin-top.c

@@ -59,7 +59,7 @@
 
 
 #include <sys/syscall.h>
 #include <sys/syscall.h>
 #include <sys/ioctl.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/prctl.h>
 #include <sys/prctl.h>
 #include <sys/wait.h>
 #include <sys/wait.h>
 #include <sys/uio.h>
 #include <sys/uio.h>

+ 1 - 1
tools/perf/util/util.h

@@ -64,7 +64,7 @@
 #include <regex.h>
 #include <regex.h>
 #include <utime.h>
 #include <utime.h>
 #include <sys/wait.h>
 #include <sys/wait.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/socket.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <sys/ioctl.h>
 #include <inttypes.h>
 #include <inttypes.h>