1From 12de53b0f24c478ea4ff6b4e2c55366dbd2f02b1 Mon Sep 17 00:00:00 2001 2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net> 3Date: Fri, 25 Nov 2016 09:33:20 +0000 4Subject: [PATCH] use POSIX poll.h instead of sys/poll.h 5MIME-Version: 1.0 6Content-Type: text/plain; charset=UTF-8 7Content-Transfer-Encoding: 8bit 8 9POSIX specifies that <poll.h> is the correct header to 10include for poll() 11 http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html 12whereas <sys/poll.h> is only needed for ancient glibc (<2.3), 13so let's follow POSIX instead. 14 15As a side-effect, this silences compilation warnings when 16compiling against the musl C-library such as: 17 18| In file included from ../../libdbus-c++-0.9.0/src/eventloop.cpp:31:0: 19| <sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] 20| #warning redirecting incorrect #include <sys/poll.h> to <poll.h> 21| ^~~~~~~ 22| In file included from ../../libdbus-c++-0.9.0/src/eventloop-integration.cpp:39:0: 23| <sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] 24| #warning redirecting incorrect #include <sys/poll.h> to <poll.h> 25| ^~~~~~~ 26 27Signed-off-by: André Draszik <git@andred.net> 28--- 29Upstream-Status: Submitted [https://github.com/andreas-volz/dbus-cplusplus/pull/3] 30Signed-off-by: André Draszik <adraszik@tycoint.com> 31 src/eventloop-integration.cpp | 2 +- 32 src/eventloop.cpp | 2 +- 33 src/pipe.cpp | 2 +- 34 3 files changed, 3 insertions(+), 3 deletions(-) 35 36Index: libdbus-c++-0.9.0/src/eventloop-integration.cpp 37=================================================================== 38--- libdbus-c++-0.9.0.orig/src/eventloop-integration.cpp 39+++ libdbus-c++-0.9.0/src/eventloop-integration.cpp 40@@ -36,7 +36,7 @@ 41 /* STD */ 42 #include <string.h> 43 #include <cassert> 44-#include <sys/poll.h> 45+#include <poll.h> 46 #include <fcntl.h> 47 48 using namespace DBus; 49Index: libdbus-c++-0.9.0/src/eventloop.cpp 50=================================================================== 51--- libdbus-c++-0.9.0.orig/src/eventloop.cpp 52+++ libdbus-c++-0.9.0/src/eventloop.cpp 53@@ -28,7 +28,7 @@ 54 #include <dbus-c++/eventloop.h> 55 #include <dbus-c++/debug.h> 56 57-#include <sys/poll.h> 58+#include <poll.h> 59 #include <sys/time.h> 60 61 #include <dbus/dbus.h> 62Index: libdbus-c++-0.9.0/src/pipe.cpp 63=================================================================== 64--- libdbus-c++-0.9.0.orig/src/pipe.cpp 65+++ libdbus-c++-0.9.0/src/pipe.cpp 66@@ -32,7 +32,7 @@ 67 68 /* STD */ 69 #include <unistd.h> 70-#include <sys/poll.h> 71+#include <poll.h> 72 #include <fcntl.h> 73 #include <errno.h> 74 #include <cassert> 75