blob: e92fc0d95d4da0639152e52782e8493fd6995602 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From b14696a55796e739624bbda4f772427032efff2a Mon Sep 17 00:00:00 2001
2From: Julien Cristau <jcristau@debian.org>
3Date: Sun, 26 Apr 2015 15:20:57 +0200
4Subject: [PATCH 1/4] Include config.h before anything else in *.c
5
6Debian bug#749008 <https://bugs.debian.org/749008>
7
8Reported-by: Michael Tautschnig <mt@debian.org>
9Signed-off-by: Julien Cristau <jcristau@debian.org>
10Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11---
12Upstream-Status: Backport
13
14 src/common_capability.c | 3 +++
15 src/common_init.c | 3 +++
16 src/common_interface.c | 3 +++
17 src/common_io.c | 3 +++
18 src/common_iterator.c | 3 +++
19 src/common_map.c | 3 +++
20 src/common_vgaarb_stub.c | 3 +++
21 src/linux_devmem.c | 5 +++--
22 src/openbsd_pci.c | 3 +++
23 src/solx_devfs.c | 3 +++
24 src/x86_pci.c | 4 +++-
25 11 files changed, 33 insertions(+), 3 deletions(-)
26
27diff --git a/src/common_capability.c b/src/common_capability.c
28index 488743d..15d395d 100644
29--- a/src/common_capability.c
30+++ b/src/common_capability.c
31@@ -31,6 +31,9 @@
32 *
33 * \author Ian Romanick <idr@us.ibm.com>
34 */
35+#ifdef HAVE_CONFIG_H
36+#include "config.h"
37+#endif
38
39 #include <stdlib.h>
40 #include <stdio.h>
41diff --git a/src/common_init.c b/src/common_init.c
42index b1c0c3e..f7b59bd 100644
43--- a/src/common_init.c
44+++ b/src/common_init.c
45@@ -28,6 +28,9 @@
46 *
47 * \author Ian Romanick <idr@us.ibm.com>
48 */
49+#ifdef HAVE_CONFIG_H
50+#include "config.h"
51+#endif
52
53 #include <stdlib.h>
54 #include <errno.h>
55diff --git a/src/common_interface.c b/src/common_interface.c
56index 59778cf..cb95e90 100644
57--- a/src/common_interface.c
58+++ b/src/common_interface.c
59@@ -28,6 +28,9 @@
60 *
61 * \author Ian Romanick <idr@us.ibm.com>
62 */
63+#ifdef HAVE_CONFIG_H
64+#include "config.h"
65+#endif
66
67 #include <stdlib.h>
68 #include <string.h>
69diff --git a/src/common_io.c b/src/common_io.c
70index f5c9e45..e9586ad 100644
71--- a/src/common_io.c
72+++ b/src/common_io.c
73@@ -22,6 +22,9 @@
74 * Author:
75 * Adam Jackson <ajax@redhat.com>
76 */
77+#ifdef HAVE_CONFIG_H
78+#include "config.h"
79+#endif
80
81 #include <stdlib.h>
82 #include <string.h>
83diff --git a/src/common_iterator.c b/src/common_iterator.c
84index ccf656d..2beb180 100644
85--- a/src/common_iterator.c
86+++ b/src/common_iterator.c
87@@ -28,6 +28,9 @@
88 *
89 * \author Ian Romanick <idr@us.ibm.com>
90 */
91+#ifdef HAVE_CONFIG_H
92+#include "config.h"
93+#endif
94
95 #include <stdlib.h>
96 #include <string.h>
97diff --git a/src/common_map.c b/src/common_map.c
98index 8757151..f1854bb 100644
99--- a/src/common_map.c
100+++ b/src/common_map.c
101@@ -21,6 +21,9 @@
102 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
103 * DEALINGS IN THE SOFTWARE.
104 */
105+#ifdef HAVE_CONFIG_H
106+#include "config.h"
107+#endif
108
109 #include <sys/types.h>
110 #include <sys/mman.h>
111diff --git a/src/common_vgaarb_stub.c b/src/common_vgaarb_stub.c
112index 9394273..c1708f6 100644
113--- a/src/common_vgaarb_stub.c
114+++ b/src/common_vgaarb_stub.c
115@@ -23,6 +23,9 @@
116 * OTHER DEALINGS IN THE SOFTWARE.
117 *
118 */
119+#ifdef HAVE_CONFIG_H
120+#include "config.h"
121+#endif
122
123 #include <stdio.h>
124 #include "pciaccess.h"
125diff --git a/src/linux_devmem.c b/src/linux_devmem.c
126index 10e3bde..0d0567c 100644
127--- a/src/linux_devmem.c
128+++ b/src/linux_devmem.c
129@@ -32,8 +32,9 @@
130 *
131 * \author Ian Romanick <idr@us.ibm.com>
132 */
133-
134-#define _GNU_SOURCE
135+#ifdef HAVE_CONFIG_H
136+#include "config.h"
137+#endif
138
139 #include <stdlib.h>
140 #include <string.h>
141diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c
142index 4d1b5cd..b8ce318 100644
143--- a/src/openbsd_pci.c
144+++ b/src/openbsd_pci.c
145@@ -13,6 +13,9 @@
146 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
147 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
148 */
149+#ifdef HAVE_CONFIG_H
150+#include "config.h"
151+#endif
152
153 #include <sys/param.h>
154 #include <sys/ioctl.h>
155diff --git a/src/solx_devfs.c b/src/solx_devfs.c
156index f572393..cf96467 100644
157--- a/src/solx_devfs.c
158+++ b/src/solx_devfs.c
159@@ -25,6 +25,9 @@
160 /*
161 * Solaris devfs interfaces
162 */
163+#ifdef HAVE_CONFIG_H
164+#include "config.h"
165+#endif
166
167 #include <stdlib.h>
168 #include <strings.h>
169diff --git a/src/x86_pci.c b/src/x86_pci.c
170index 49c1cab..32daa04 100644
171--- a/src/x86_pci.c
172+++ b/src/x86_pci.c
173@@ -18,8 +18,10 @@
174 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
175 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
176 */
177+#ifdef HAVE_CONFIG_H
178+#include "config.h"
179+#endif
180
181-#define _GNU_SOURCE
182 #include <unistd.h>
183 #include <stdio.h>
184 #include <stdlib.h>
185--
1862.1.4
187