net-tools/net-tools-1.60-ifdef-vs-if.patch

75 lines
2.2 KiB
Diff
Raw Normal View History

diff -up net-tools-1.60/ifconfig.c.ifdef-vs-if net-tools-1.60/ifconfig.c
--- net-tools-1.60/ifconfig.c.ifdef-vs-if 2011-01-03 12:23:14.000000000 +0100
+++ net-tools-1.60/ifconfig.c 2011-01-03 12:31:40.000000000 +0100
@@ -51,7 +51,7 @@
#include <asm/types.h>
-#ifdef HAVE_HWSLIP
+#if HAVE_HWSLIP
#include <linux/if_slip.h>
#endif
@@ -784,7 +784,7 @@ int main(int argc, char **argv)
continue;
}
#endif
-#ifdef HAVE_AFINET
+#if HAVE_AFINET
{ /* ipv4 address a.b.c.d */
unsigned long ip, nm, bc;
safe_strncpy(host, *spp, (sizeof host));
@@ -875,7 +875,7 @@ int main(int argc, char **argv)
continue;
}
#endif
-#ifdef HAVE_AFINET
+#if HAVE_AFINET
{
/* ipv4 address a.b.c.d */
unsigned long ip, nm, bc;
diff -up net-tools-1.60/lib/interface.c.ifdef-vs-if net-tools-1.60/lib/interface.c
--- net-tools-1.60/lib/interface.c.ifdef-vs-if 2011-01-03 12:23:14.000000000 +0100
+++ net-tools-1.60/lib/interface.c 2011-01-03 12:40:57.000000000 +0100
@@ -36,7 +36,7 @@
#include <neteconet/ec.h>
#endif
-#ifdef HAVE_HWSLIP
+#if HAVE_HWSLIP
#include <linux/if_slip.h>
#include <net/if_arp.h>
#endif
@@ -482,7 +482,7 @@ int if_fetch(struct interface *ife)
else
ife->mtu = ifr.ifr_mtu;
-#ifdef HAVE_HWSLIP
+#if HAVE_HWSLIP
if (ife->type == ARPHRD_SLIP || ife->type == ARPHRD_CSLIP ||
ife->type == ARPHRD_SLIP6 || ife->type == ARPHRD_CSLIP6 ||
ife->type == ARPHRD_ADAPT) {
@@ -726,8 +726,10 @@ void ife_print_long(struct interface *pt
hf = ptr->type;
+#if HAVE_HWSLIP
if (hf == ARPHRD_CSLIP || hf == ARPHRD_CSLIP6)
can_compress = 1;
+#endif
hw = get_hwntype(hf);
if (hw == NULL)
diff -up net-tools-1.60/lib/net-support.h.ifdef-vs-if net-tools-1.60/lib/net-support.h
--- net-tools-1.60/lib/net-support.h.ifdef-vs-if 2000-10-28 12:59:42.000000000 +0200
+++ net-tools-1.60/lib/net-support.h 2011-01-03 12:33:21.000000000 +0100
@@ -234,7 +234,7 @@ extern char afname[];
/* this is a 2.0.36 flag from /usr/src/linux/include/linux/route.h */
#define RTF_NOTCACHED 0x0400 /* this route isn't cached */
-#ifdef HAVE_AFECONET
+#if HAVE_AFECONET
#ifndef AF_ECONET
#define AF_ECONET 19 /* Acorn Econet */
#endif