aboutsummaryrefslogtreecommitdiffstats
path: root/main/ppp/musl-fix-headers.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-01-13 13:19:43 +0000
committerTimo Teräs <timo.teras@iki.fi>2014-01-13 13:20:00 +0000
commit71b6c9cdd26586ba96a21130e841b54ea593d0fb (patch)
treedfbb088e3f19fb9099c2311f9c002dfaa268010d /main/ppp/musl-fix-headers.patch
parent4faf5a177cc4cc276bb6a16627d9350041c21696 (diff)
downloadaports-71b6c9cdd26586ba96a21130e841b54ea593d0fb.tar.bz2
aports-71b6c9cdd26586ba96a21130e841b54ea593d0fb.tar.xz
main/ppp: fix musl build
Diffstat (limited to 'main/ppp/musl-fix-headers.patch')
-rw-r--r--main/ppp/musl-fix-headers.patch123
1 files changed, 123 insertions, 0 deletions
diff --git a/main/ppp/musl-fix-headers.patch b/main/ppp/musl-fix-headers.patch
new file mode 100644
index 0000000000..6a43cc0fd1
--- /dev/null
+++ b/main/ppp/musl-fix-headers.patch
@@ -0,0 +1,123 @@
+--- ppp-2.4.5.orig/include/net/ppp_defs.h
++++ ppp-2.4.5/include/net/ppp_defs.h
+@@ -38,6 +38,8 @@
+ #ifndef _PPP_DEFS_H_
+ #define _PPP_DEFS_H_
+
++#include <sys/time.h>
++
+ /*
+ * The basic PPP frame.
+ */
+--- ppp-2.4.5.orig/pppd/ipv6cp.c
++++ ppp-2.4.5/pppd/ipv6cp.c
+@@ -151,6 +151,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <netdb.h>
+--- ppp-2.4.5.orig/pppd/magic.h
++++ ppp-2.4.5/pppd/magic.h
+@@ -42,6 +42,8 @@
+ * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
+ */
+
++#include <sys/cdefs.h>
++
+ void magic_init __P((void)); /* Initialize the magic number generator */
+ u_int32_t magic __P((void)); /* Returns the next magic number */
+
+--- ppp-2.4.5.orig/pppd/sys-linux.c
++++ ppp-2.4.5/pppd/sys-linux.c
+@@ -102,19 +102,11 @@
+ #define MAX_ADDR_LEN 7
+ #endif
+
+-#if __GLIBC__ >= 2
+ #include <asm/types.h> /* glibc 2 conflicts with linux/types.h */
+ #include <net/if.h>
+ #include <net/if_arp.h>
+ #include <net/route.h>
+ #include <netinet/if_ether.h>
+-#else
+-#include <linux/types.h>
+-#include <linux/if.h>
+-#include <linux/if_arp.h>
+-#include <linux/route.h>
+-#include <linux/if_ether.h>
+-#endif
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+
+--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/if.c
++++ ppp-2.4.5/pppd/plugins/rp-pppoe/if.c
+@@ -30,10 +30,6 @@
+ #include <linux/if_packet.h>
+ #endif
+
+-#ifdef HAVE_NET_ETHERNET_H
+-#include <net/ethernet.h>
+-#endif
+-
+ #ifdef HAVE_ASM_TYPES_H
+ #include <asm/types.h>
+ #endif
+--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/plugin.c
++++ ppp-2.4.5/pppd/plugins/rp-pppoe/plugin.c
+@@ -46,7 +46,6 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <signal.h>
+-#include <net/ethernet.h>
+ #include <net/if_arp.h>
+ #include <linux/ppp_defs.h>
+ #include <linux/if_ppp.h>
+--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c
++++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c
+@@ -27,10 +27,6 @@
+ #include <linux/if_packet.h>
+ #endif
+
+-#ifdef HAVE_NET_ETHERNET_H
+-#include <net/ethernet.h>
+-#endif
+-
+ #ifdef HAVE_ASM_TYPES_H
+ #include <asm/types.h>
+ #endif
+--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/pppoe.h
++++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe.h
+@@ -86,18 +86,6 @@
+
+ #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
+-
+-
+
+ /* Ethernet frame types according to RFC 2516 */
+ #define ETH_PPPOE_DISCOVERY 0x8863
+Only in ppp-2.4.5/pppd/plugins/rp-pppoe: pppoe-discovery
+--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c
++++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c
+@@ -51,6 +51,8 @@
+ exit(status);
+ }
+
++#define error(x...) fprintf(stderr, x)
++
+ /* Initialize frame types to RFC 2516 values. Some broken peers apparently
+ use different frame types... sigh... */
+