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
|
diff -up rp-pppoe-3.12/src/if.c.than rp-pppoe-3.12/src/if.c
--- rp-pppoe-3.12/src/if.c.than 2017-07-25 11:04:53.780466912 +0200
+++ rp-pppoe-3.12/src/if.c 2017-07-25 11:05:35.951885962 +0200
@@ -20,6 +20,12 @@ static char const RCSID[] =
#include "pppoe.h"
+#if defined(HAVE_LINUX_IF_H)
+#include <linux/if.h>
+#elif defined(HAVE_NET_IF_H)
+#include <net/if.h>
+#endif
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff -up rp-pppoe-3.12/src/plugin.c.than rp-pppoe-3.12/src/plugin.c
--- rp-pppoe-3.12/src/plugin.c.than 2017-07-25 11:05:50.145353868 +0200
+++ rp-pppoe-3.12/src/plugin.c 2017-07-25 11:07:00.068732535 +0200
@@ -49,6 +49,11 @@ static char const RCSID[] =
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
+#if defined(HAVE_LINUX_IF_H)
+#include <linux/if.h>
+#elif defined(HAVE_NET_IF_H)
+#include <net/if.h>
+#endif
#include <net/ethernet.h>
#include <net/if_arp.h>
#include <linux/ppp_defs.h>
diff -up rp-pppoe-3.12/src/pppoe.h.than rp-pppoe-3.12/src/pppoe.h
--- rp-pppoe-3.12/src/pppoe.h.than 2017-07-25 11:07:38.141305245 +0200
+++ rp-pppoe-3.12/src/pppoe.h 2017-07-25 11:08:34.409195838 +0200
@@ -51,13 +51,6 @@ extern int IsSetID;
#include <sys/socket.h>
#endif
-/* Ugly header files on some Linux boxes... */
-#if defined(HAVE_LINUX_IF_H)
-#include <linux/if.h>
-#elif defined(HAVE_NET_IF_H)
-#include <net/if.h>
-#endif
-
#ifdef HAVE_NET_IF_TYPES_H
#include <net/if_types.h>
#endif
@@ -136,9 +129,6 @@ typedef unsigned long UINT32_t;
#ifdef HAVE_NETINET_IF_ETHER_H
#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifndef HAVE_SYS_DLPI_H
#include <netinet/if_ether.h>
#endif
diff -up rp-pppoe-3.12/src/pppoe-server.c.than rp-pppoe-3.12/src/pppoe-server.c
--- rp-pppoe-3.12/src/pppoe-server.c.than 2017-07-25 11:08:51.505554918 +0200
+++ rp-pppoe-3.12/src/pppoe-server.c 2017-07-25 11:09:59.230016098 +0200
@@ -26,6 +26,13 @@ static char const RCSID[] =
#define _BSD_SOURCE 1 /* for gethostname */
+#include <sys/socket.h>
+#if defined(HAVE_LINUX_IF_H)
+#include <linux/if.h>
+#elif defined(HAVE_NET_IF_H)
+#include <net/if.h>
+#endif
+
#include "pppoe-server.h"
#include "md5.h"
diff -up rp-pppoe-3.12/src/relay.c.than rp-pppoe-3.12/src/relay.c
--- rp-pppoe-3.12/src/relay.c.than 2017-07-25 11:10:13.863467871 +0200
+++ rp-pppoe-3.12/src/relay.c 2017-07-25 11:11:17.747074537 +0200
@@ -18,11 +18,19 @@ static char const RCSID[] =
"$Id$";
#define _GNU_SOURCE 1 /* For SA_RESTART */
-
-#include "relay.h"
+#include "config.h"
#include <signal.h>
+#include <sys/socket.h>
+#if defined(HAVE_LINUX_IF_H)
+#include <linux/if.h>
+#elif defined(HAVE_NET_IF_H)
+#include <net/if.h>
+#endif
+
+#include "relay.h"
+
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
#endif
|