You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
freifunkist-firmware/package/network/services/ppp/patches/140-pppoe_compile_fix.patch

83 lines
1.8 KiB

--- a/pppd/plugins/rp-pppoe/pppoe.h
+++ b/pppd/plugins/rp-pppoe/pppoe.h
@@ -48,11 +48,7 @@
#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>
@@ -80,22 +76,8 @@ typedef unsigned long UINT32_t;
#error Could not find a 32-bit integer type
#endif
-#ifdef HAVE_LINUX_IF_ETHER_H
-#include <linux/if_ether.h>
-#endif
-
#include <netinet/in.h>
-
-#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
-#endif
+#include <net/ethernet.h>
--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
@@ -16,6 +16,7 @@
#include <string.h>
#include "pppoe.h"
+#include "pppd/pppd.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -717,6 +718,23 @@ char *xstrdup(const char *s)
return ret;
}
+void
+error(char *fmt, ...)
+{
+ va_list pvar;
+
+#if defined(__STDC__)
+ va_start(pvar, fmt);
+#else
+ char *fmt;
+ va_start(pvar);
+ fmt = va_arg(pvar, char *);
+#endif
+
+ fprintf(stderr, fmt, pvar);
+ va_end(pvar);
+}
+
void usage(void)
{
fprintf(stderr, "Usage: pppoe-discovery [options]\n");
--- a/pppd/plugins/rp-pppoe/Makefile.linux
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
@@ -33,7 +33,7 @@ pppoe-discovery: pppoe-discovery.o debug
$(CC) $(CFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o
pppoe-discovery.o: pppoe-discovery.c
- $(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
+ $(CC) $(CFLAGS) -I../../.. -c -o pppoe-discovery.o pppoe-discovery.c
debug.o: debug.c
$(CC) $(CFLAGS) -c -o debug.o debug.c