summaryrefslogtreecommitdiffstats
path: root/patches/connman-1.35/0001-tethering-Reorder-header-includes.patch
blob: af86b930b4779e66e294445d0b9fe29b689f2813 (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
From: Daniel Wagner <wagi@monom.org>
Date: Wed, 17 Jan 2018 23:42:50 +0100
Subject: [PATCH] tethering: Reorder header includes

Avoid compile errors due to unsupported header include order with
newer kernels (>=4.15). We should import the libc header files first
and then the Linux header files in user space applications.

Reported by Neil MacLeod <neil@nmacleod.com>. Fix probosal by Jonas
Bonn <jonas@southpole.se> and Hauke Mehrtens <hauke@hauke-m.de>.
---
 src/tethering.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tethering.c b/src/tethering.c
index c929ba71a6dd..4b202369106f 100644
--- a/src/tethering.c
+++ b/src/tethering.c
@@ -31,11 +31,11 @@
 #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/sockios.h>
+#include <linux/if_tun.h>
 #include <linux/if_bridge.h>
 
 #include "connman.h"