OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 1... | Line 1... | |||
1 | --- a/pppd/plugins/rp-pppoe/pppoe.h |
1 | --- a/pppd/plugins/rp-pppoe/pppoe.h |
|
2 | +++ b/pppd/plugins/rp-pppoe/pppoe.h |
2 | +++ b/pppd/plugins/rp-pppoe/pppoe.h |
|
3 | @@ -52,11 +52,7 @@ |
3 | @@ -48,11 +48,7 @@ |
|
4 | #include <netinet/in.h> |
4 | #endif |
|
Line 5... | Line 5... | |||
5 | |
5 | |
|
6 | /* Ugly header files on some Linux boxes... */ |
6 | /* Ugly header files on some Linux boxes... */ |
|
7 | -#if defined(HAVE_LINUX_IF_H) |
7 | -#if defined(HAVE_LINUX_IF_H) |
|
8 | -#include <linux/if.h> |
8 | -#include <linux/if.h> |
|
9 | -#elif defined(HAVE_NET_IF_H) |
9 | -#elif defined(HAVE_NET_IF_H) |
|
10 | #include <net/if.h> |
10 | #include <net/if.h> |
|
Line 11... | Line 11... | |||
11 | -#endif |
11 | -#endif |
|
12 | |
12 | |
|
13 | #ifdef HAVE_NET_IF_TYPES_H |
13 | #ifdef HAVE_NET_IF_TYPES_H |
|
14 | #include <net/if_types.h> |
14 | #include <net/if_types.h> |
|
15 | @@ -84,20 +80,7 @@ typedef unsigned long UINT32_t; |
15 | @@ -80,22 +76,8 @@ typedef unsigned long UINT32_t; |
|
Line 16... | Line 16... | |||
16 | #error Could not find a 32-bit integer type |
16 | #error Could not find a 32-bit integer type |
|
17 | #endif |
17 | #endif |
|
18 | |
18 | |
|
19 | -#ifdef HAVE_LINUX_IF_ETHER_H |
19 | -#ifdef HAVE_LINUX_IF_ETHER_H |
|
- | 20 | -#include <linux/if_ether.h> |
||
- | 21 | -#endif |
||
20 | -#include <linux/if_ether.h> |
22 | - |
|
21 | -#endif |
23 | #include <netinet/in.h> |
|
22 | - |
24 | - |
|
23 | -#ifdef HAVE_NETINET_IF_ETHER_H |
25 | -#ifdef HAVE_NETINET_IF_ETHER_H |
|
24 | -#include <sys/types.h> |
26 | -#include <sys/types.h> |
|
Line 31... | Line 33... | |||
31 | -#endif |
33 | -#endif |
|
32 | -#endif |
34 | -#endif |
|
33 | +#include <net/ethernet.h> |
35 | +#include <net/ethernet.h> |
|
Line -... | Line 36... | |||
- | 36 | |
||
- | 37 | |
||
- | 38 | |
||
- | 39 | --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c |
||
- | 40 | +++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c |
||
- | 41 | @@ -16,6 +16,7 @@ |
||
- | 42 | #include <string.h> |
||
- | 43 | |
||
- | 44 | #include "pppoe.h" |
||
- | 45 | +#include "pppd/pppd.h" |
||
- | 46 | |
||
- | 47 | #ifdef HAVE_UNISTD_H |
||
- | 48 | #include <unistd.h> |
||
- | 49 | @@ -717,6 +718,23 @@ char *xstrdup(const char *s) |
||
- | 50 | return ret; |
||
- | 51 | } |
||
- | 52 | |
||
- | 53 | +void |
||
- | 54 | +error(char *fmt, ...) |
||
- | 55 | +{ |
||
- | 56 | + va_list pvar; |
||
- | 57 | + |
||
- | 58 | +#if defined(__STDC__) |
||
- | 59 | + va_start(pvar, fmt); |
||
- | 60 | +#else |
||
- | 61 | + char *fmt; |
||
- | 62 | + va_start(pvar); |
||
- | 63 | + fmt = va_arg(pvar, char *); |
||
- | 64 | +#endif |
||
- | 65 | + |
||
- | 66 | + fprintf(stderr, fmt, pvar); |
||
- | 67 | + va_end(pvar); |
||
- | 68 | +} |
||
- | 69 | + |
||
34 | |
70 | void usage(void) |
|
35 | |
71 | { |
|
36 | /* Ethernet frame types according to RFC 2516 */ |
72 | fprintf(stderr, "Usage: pppoe-discovery [options]\n"); |
|
37 | --- a/pppd/plugins/rp-pppoe/Makefile.linux |
73 | --- a/pppd/plugins/rp-pppoe/Makefile.linux |
|
38 | +++ b/pppd/plugins/rp-pppoe/Makefile.linux |
74 | +++ b/pppd/plugins/rp-pppoe/Makefile.linux |
|
Line 39... | Line 75... | |||
39 | @@ -33,7 +33,7 @@ pppoe-discovery: pppoe-discovery.o debug |
75 | @@ -33,7 +33,7 @@ pppoe-discovery: pppoe-discovery.o debug |
|
40 | $(CC) $(LDFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o |
76 | $(CC) $(CFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o |
|
41 | |
77 | |