Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | Adjust headers for non-glibc cases |
| 2 | especially exposed by musl |
| 3 | |
| 4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 5 | Upstream-Status: Pending |
| 6 | |
| 7 | Index: net-tools-1.60/lib/inet6_gr.c |
| 8 | =================================================================== |
| 9 | --- net-tools-1.60.orig/lib/inet6_gr.c |
| 10 | +++ net-tools-1.60/lib/inet6_gr.c |
| 11 | @@ -23,7 +23,7 @@ |
| 12 | #include <string.h> |
| 13 | #include <stdio.h> |
| 14 | #include <unistd.h> |
| 15 | -#ifndef __GLIBC__ |
| 16 | +#ifdef HAVE_IPV6_ROUTE_H |
| 17 | #include <netinet6/ipv6_route.h> /* glibc doesn't have this */ |
| 18 | #endif |
| 19 | #include "version.h" |
| 20 | Index: net-tools-1.60/lib/inet6_sr.c |
| 21 | =================================================================== |
| 22 | --- net-tools-1.60.orig/lib/inet6_sr.c |
| 23 | +++ net-tools-1.60/lib/inet6_sr.c |
| 24 | @@ -23,10 +23,10 @@ |
| 25 | #include <string.h> |
| 26 | #include <stdio.h> |
| 27 | #include <unistd.h> |
| 28 | -#ifdef __GLIBC__ |
| 29 | -#include <net/route.h> |
| 30 | -#else |
| 31 | +#ifdef HAVE_IPV6_ROUTE_H |
| 32 | #include <netinet6/ipv6_route.h> /* glibc does not have this */ |
| 33 | +#else |
| 34 | +#include <net/route.h> |
| 35 | #endif |
| 36 | #include "version.h" |
| 37 | #include "net-support.h" |
| 38 | Index: net-tools-1.60/lib/inet_sr.c |
| 39 | =================================================================== |
| 40 | --- net-tools-1.60.orig/lib/inet_sr.c |
| 41 | +++ net-tools-1.60/lib/inet_sr.c |
| 42 | @@ -26,6 +26,7 @@ |
| 43 | #include <string.h> |
| 44 | #include <stdio.h> |
| 45 | #include <unistd.h> |
| 46 | +#include <asm-generic/param.h> |
| 47 | #include "version.h" |
| 48 | #include "net-support.h" |
| 49 | #include "pathnames.h" |
| 50 | Index: net-tools-1.60/lib/util-ank.c |
| 51 | =================================================================== |
| 52 | --- net-tools-1.60.orig/lib/util-ank.c |
| 53 | +++ net-tools-1.60/lib/util-ank.c |
| 54 | @@ -14,6 +14,7 @@ |
| 55 | * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses |
| 56 | */ |
| 57 | |
| 58 | +#include <limits.h> |
| 59 | #include <stdio.h> |
| 60 | #include <stdlib.h> |
| 61 | #include <unistd.h> |
| 62 | Index: net-tools-1.60/mii-tool.c |
| 63 | =================================================================== |
| 64 | --- net-tools-1.60.orig/mii-tool.c |
| 65 | +++ net-tools-1.60/mii-tool.c |
| 66 | @@ -47,10 +47,6 @@ static char Version[] = "$Id: mii-tool.c |
| 67 | #include <net/if.h> |
| 68 | #include <linux/sockios.h> |
| 69 | |
| 70 | -#ifndef __GLIBC__ |
| 71 | -#include <linux/if_arp.h> |
| 72 | -#include <linux/if_ether.h> |
| 73 | -#endif |
| 74 | #include "mii.h" |
| 75 | #include "version.h" |
| 76 | |
| 77 | Index: net-tools-1.60/netstat.c |
| 78 | =================================================================== |
| 79 | --- net-tools-1.60.orig/netstat.c |
| 80 | +++ net-tools-1.60/netstat.c |
| 81 | @@ -87,6 +87,7 @@ |
| 82 | #include <dirent.h> |
| 83 | #include <sys/stat.h> |
| 84 | #include <sys/types.h> |
| 85 | +#include <asm-generic/param.h> |
| 86 | |
| 87 | #include "net-support.h" |
| 88 | #include "pathnames.h" |
| 89 | Index: net-tools-1.60/slattach.c |
| 90 | =================================================================== |
| 91 | --- net-tools-1.60.orig/slattach.c |
| 92 | +++ net-tools-1.60/slattach.c |
| 93 | @@ -44,6 +44,7 @@ |
| 94 | #include <string.h> |
| 95 | #include <unistd.h> |
| 96 | #include <getopt.h> |
| 97 | +#include <termios.h> |
| 98 | #include <linux/if_slip.h> |
| 99 | |
| 100 | #if defined(__GLIBC__) |