aboutsummaryrefslogtreecommitdiff
blob: 18f4087079bd9bcaf0c4a4ba39d69d7cdf4ff438 (plain)
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
diff -Naurw connman-1.31.orig/configure.ac connman-1.31/configure.ac
--- connman-1.31.orig/configure.ac	2015-12-27 19:05:49.000000000 -0800
+++ connman-1.31/configure.ac	2016-02-01 11:22:09.576978370 -0800
@@ -175,6 +175,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 -Naurw connman-1.31.orig/gdhcp/common.c connman-1.31/gdhcp/common.c
--- connman-1.31.orig/gdhcp/common.c	2015-04-19 15:16:21.000000000 -0700
+++ connman-1.31/gdhcp/common.c	2016-02-01 11:22:46.169977330 -0800
@@ -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>
@@ -40,6 +40,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 -Naurw connman-1.31.orig/gdhcp/common.h connman-1.31/gdhcp/common.h
--- connman-1.31.orig/gdhcp/common.h	2015-04-19 15:16:21.000000000 -0700
+++ connman-1.31/gdhcp/common.h	2016-02-01 11:29:53.731965170 -0800
@@ -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 compiler 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 */
diff -Naurw connman-1.31.orig/gweb/gresolv.c connman-1.31/gweb/gresolv.c
--- connman-1.31.orig/gweb/gresolv.c	2014-04-04 05:12:07.000000000 -0700
+++ connman-1.31/gweb/gresolv.c	2016-02-01 11:27:46.207968797 -0800
@@ -24,6 +24,7 @@
 #endif
 
 #include <errno.h>
+#include <stdio.h>
 #include <unistd.h>
 #include <stdarg.h>
 #include <string.h>
diff -Naurw connman-1.31.orig/plugins/wifi.c connman-1.31/plugins/wifi.c
--- connman-1.31.orig/plugins/wifi.c	2015-12-27 19:05:49.000000000 -0800
+++ connman-1.31/plugins/wifi.c	2016-02-01 11:25:59.192971840 -0800
@@ -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 -Naurw connman-1.31.orig/src/tethering.c connman-1.31/src/tethering.c
--- connman-1.31.orig/src/tethering.c	2015-12-27 19:05:49.000000000 -0800
+++ connman-1.31/src/tethering.c	2016-02-01 11:26:50.049970394 -0800
@@ -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 -Naurw connman-1.31.orig/tools/dhcp-test.c connman-1.31/tools/dhcp-test.c
--- connman-1.31.orig/tools/dhcp-test.c	2013-08-19 09:57:25.000000000 -0700
+++ connman-1.31/tools/dhcp-test.c	2016-02-01 11:25:21.907972901 -0800
@@ -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 -Naurw connman-1.31.orig/tools/dnsproxy-test.c connman-1.31/tools/dnsproxy-test.c
--- connman-1.31.orig/tools/dnsproxy-test.c	2013-12-04 23:12:12.000000000 -0800
+++ connman-1.31/tools/dnsproxy-test.c	2016-02-01 11:27:04.525969982 -0800
@@ -24,6 +24,7 @@
 #endif
 
 #include <errno.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>