Add missing dependency
[AGL/meta-agl-demo.git] / recipes-core / dbus / libdbus-c++-0.9.0 / 0004-use-POSIX-poll.h-instead-of-sys-poll.h.patch
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
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
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  #include <unistd.h>
48  
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
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>
62 diff --git a/src/pipe.cpp b/src/pipe.cpp
63 index 01211b3..45c2ba6 100644
64 --- a/src/pipe.cpp
65 +++ b/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 -- 
76 2.10.2
77