Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From 12de53b0f24c478ea4ff6b4e2c55366dbd2f02b1 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net> |
| 3 | Date: Fri, 25 Nov 2016 09:33:20 +0000 |
| 4 | Subject: [PATCH] use POSIX poll.h instead of sys/poll.h |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | POSIX specifies that <poll.h> is the correct header to |
| 10 | include for poll() |
| 11 | http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html |
| 12 | whereas <sys/poll.h> is only needed for ancient glibc (<2.3), |
| 13 | so let's follow POSIX instead. |
| 14 | |
| 15 | As a side-effect, this silences compilation warnings when |
| 16 | compiling 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 | |
| 27 | Signed-off-by: André Draszik <git@andred.net> |
| 28 | --- |
| 29 | Upstream-Status: Submitted [https://github.com/andreas-volz/dbus-cplusplus/pull/3] |
| 30 | Signed-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 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 36 | Index: 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 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 47 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 48 | using namespace DBus; |
| 49 | Index: 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 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 62 | Index: 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 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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> |