1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
--- ./configure.ac.orig
+++ ./configure.ac
@@ -171,6 +171,8 @@
AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
+AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include <netinet/in.h>]])
+AC_CHECK_HEADERS(execinfo.h)
AC_CHECK_HEADERS(resolv.h, dummy=yes,
AC_MSG_ERROR(resolver header files are required))
AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
diff --git a/gdhcp/common.c b/gdhcp/common.c
index e111150..ee4dc43 100644
--- a/gdhcp/common.c
+++ b/gdhcp/common.c
@@ -22,6 +22,7 @@
#include <config.h>
#endif
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@@ -31,7 +32,6 @@
#include <string.h>
#include <endian.h>
#include <net/if_arp.h>
-#include <linux/if.h>
#include <netpacket/packet.h>
#include <net/ethernet.h>
#include <arpa/inet.h>
@@ -39,6 +39,8 @@
#include "gdhcp.h"
#include "common.h"
+#include <linux/if.h>
+
static const DHCPOption client_options[] = {
{ OPTION_IP, 0x01 }, /* subnet-mask */
{ OPTION_IP | OPTION_LIST, 0x03 }, /* routers */
diff --git a/src/log.c b/src/log.c
index a693bd0..9054462 100644
--- a/src/log.c
+++ b/src/log.c
static void signal_handler(int signo)
diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c
index c34e10a..eae66fc 100644
--- a/tools/dhcp-test.c
+++ b/tools/dhcp-test.c
@@ -33,7 +33,6 @@
#include <arpa/inet.h>
#include <net/route.h>
#include <net/ethernet.h>
-#include <linux/if_arp.h>
#include <gdhcp/gdhcp.h>
diff --exclude '*.*o' -ru connman-1.24.orig/plugins/wifi.c connman-1.24/plugins/wifi.c
--- connman-1.24.orig/plugins/wifi.c 2014-06-07 21:46:22.000000000 -0300
+++ connman-1.24/plugins/wifi.c 2014-07-18 20:37:16.811343663 -0300
@@ -30,9 +30,8 @@
#include <string.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-#include <linux/if_arp.h>
-#include <linux/wireless.h>
#include <net/ethernet.h>
+#include <linux/wireless.h>
#ifndef IFF_LOWER_UP
#define IFF_LOWER_UP 0x10000
diff --exclude '*.*o' -ru connman-1.24.orig/src/tethering.c connman-1.24/src/tethering.c
--- connman-1.24.orig/src/tethering.c 2014-04-04 15:12:07.000000000 -0300
+++ connman-1.24/src/tethering.c 2014-07-18 20:39:12.091344804 -0300
@@ -31,10 +31,8 @@
#include <stdio.h>
#include <sys/ioctl.h>
#include <net/if.h>
-#include <linux/sockios.h>
#include <string.h>
#include <fcntl.h>
-#include <linux/if_tun.h>
#include <netinet/in.h>
#include <linux/if_bridge.h>
diff --exclude '*.*o' -ru connman-1.24.orig/tools/dnsproxy-test.c connman-1.24/tools/dnsproxy-test.c
--- connman-1.24.orig/tools/dnsproxy-test.c 2013-12-05 09:12:12.000000000 -0200
+++ connman-1.24/tools/dnsproxy-test.c 2014-07-18 20:36:37.484676606 -0300
@@ -24,6 +24,7 @@
#endif
#include <errno.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --exclude '*.*o' -ru connman-1.24.orig/tools/private-network-test.c connman-1.24/tools/private-network-test.c
--- connman-1.24.orig/tools/private-network-test.c 2013-08-19 19:57:25.000000000 -0300
+++ connman-1.24/tools/private-network-test.c 2014-07-18 20:28:42.644671909 -0300
@@ -32,7 +32,7 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/signalfd.h>
#include <unistd.h>
diff --exclude '*.*o' -ru connman-1.24.orig/tools/tap-test.c connman-1.24/tools/tap-test.c
--- connman-1.24.orig/tools/tap-test.c 2013-12-05 09:12:12.000000000 -0200
+++ connman-1.24/tools/tap-test.c 2014-07-18 20:28:35.351338499 -0300
@@ -29,7 +29,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
diff '--exclude=*.*o' -ru connman-1.24.orig/gweb/gresolv.c connman-1.24/gweb/gresolv.c
--- connman-1.24.orig/gweb/gresolv.c 2014-07-18 20:43:40.000000000 -0300
+++ connman-1.24/gweb/gresolv.c 2014-07-18 20:44:43.284681413 -0300
@@ -24,6 +24,7 @@
#endif
#include <errno.h>
+#include <stdio.h>
#include <unistd.h>
#include <stdarg.h>
#include <string.h>
diff '--exclude=*.*o' -ru connman-1.24.orig/src/ippool.c connman-1.24/src/ippool.c
--- connman-1.24.orig/src/ippool.c 2014-04-04 15:12:07.000000000 -0300
+++ connman-1.24/src/ippool.c 2014-07-18 20:44:56.068014872 -0300
@@ -28,7 +28,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <sys/socket.h>
#include "connman.h"
diff '--exclude=*.*o' -ru connman-1.24.orig/src/iptables.c connman-1.24/src/iptables.c
--- connman-1.24.orig/src/iptables.c 2014-04-04 15:12:07.000000000 -0300
+++ connman-1.24/src/iptables.c 2014-07-18 20:44:25.844681240 -0300
@@ -28,7 +28,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <sys/socket.h>
#include <xtables.h>
--- ./gdhcp/common.h.orig
+++ ./gdhcp/common.h
@@ -18,6 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <netinet/udp.h>
#include <netinet/ip.h>
@@ -170,8 +173,8 @@
[OPTION_U32] = 4,
};
-/* already defined within netinet/in.h if using GNU compiler */
-#ifndef __USE_GNU
+/* already defined within netinet/in.h if using GNU or musl libc */
+#ifndef HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR
struct in6_pktinfo {
struct in6_addr ipi6_addr; /* src/dst IPv6 address */
unsigned int ipi6_ifindex; /* send/recv interface index */
|