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
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 POSIX specifies that <poll.h> is the correct header to
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.
15 As a side-effect, this silences compilation warnings when
16 compiling against the musl C-library such as:
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>
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>
27 Signed-off-by: André Draszik <git@andred.net>
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 +-
34 3 files changed, 3 insertions(+), 3 deletions(-)
36 diff --git a/src/eventloop-integration.cpp b/src/eventloop-integration.cpp
37 index 5776971..271b503 100644
38 --- a/src/eventloop-integration.cpp
39 +++ b/src/eventloop-integration.cpp
44 -#include <sys/poll.h>
49 diff --git a/src/eventloop.cpp b/src/eventloop.cpp
50 index f622812..7790e1e 100644
51 --- a/src/eventloop.cpp
52 +++ b/src/eventloop.cpp
54 #include <dbus-c++/eventloop.h>
55 #include <dbus-c++/debug.h>
57 -#include <sys/poll.h>
61 #include <dbus/dbus.h>
62 diff --git a/src/pipe.cpp b/src/pipe.cpp
63 index 01211b3..45c2ba6 100644
70 -#include <sys/poll.h>