aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Eckenfels <net-tools@lina.inka.de>2011-01-01 03:22:31 +0000
committerBernd Eckenfels <net-tools@lina.inka.de>2011-01-01 03:22:31 +0000
commitc65379a00b9361d8b2c95bca0af082e6098d0145 (patch)
treee5a809d851df73e1962c057f149dee430a14f9c9
parent[Bug #17645] Add netstat(8) support for RcvbufErrors, SndbufErrors. (diff)
downloadnet-tools-c65379a00b9361d8b2c95bca0af082e6098d0145.tar.gz
net-tools-c65379a00b9361d8b2c95bca0af082e6098d0145.tar.bz2
net-tools-c65379a00b9361d8b2c95bca0af082e6098d0145.zip
Bug #17812 Fix the handling of some of the HAVE_* flags ifdef vs if. --jpa468
-rw-r--r--ifconfig.c8
-rw-r--r--lib/interface.c8
-rw-r--r--lib/net-support.h2
3 files changed, 10 insertions, 8 deletions
diff --git a/ifconfig.c b/ifconfig.c
index ab3f621..952e705 100644
--- a/ifconfig.c
+++ b/ifconfig.c
@@ -3,7 +3,7 @@
* that either displays or sets the characteristics of
* one or more of the system's networking interfaces.
*
- * Version: $Id: ifconfig.c,v 1.58 2008/10/02 23:31:04 ecki Exp $
+ * Version: $Id: ifconfig.c,v 1.59 2011-01-01 03:22:31 ecki Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* and others. Copyright 1993 MicroWalt Corporation
@@ -49,7 +49,7 @@
#include <asm/types.h>
-#ifdef HAVE_HWSLIP
+#if HAVE_HWSLIP
#include <linux/if_slip.h>
#endif
@@ -778,7 +778,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));
@@ -871,7 +871,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 --git a/lib/interface.c b/lib/interface.c
index c9f5923..0e5e454 100644
--- a/lib/interface.c
+++ b/lib/interface.c
@@ -7,7 +7,7 @@
8/2000 Andi Kleen make the list operations a bit more efficient.
People are crazy enough to use thousands of aliases now.
- $Id: interface.c,v 1.34 2010/01/01 06:35:30 vapier Exp $
+ $Id: interface.c,v 1.35 2011-01-01 03:22:31 ecki Exp $
*/
#include "config.h"
@@ -37,7 +37,7 @@
#include <neteconet/ec.h>
#endif
-#ifdef HAVE_HWSLIP
+#if HAVE_HWSLIP
#include <linux/if_slip.h>
#include <net/if_arp.h>
#endif
@@ -437,7 +437,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) {
@@ -682,8 +682,10 @@ void ife_print_long(struct interface *ptr)
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 --git a/lib/net-support.h b/lib/net-support.h
index c963fe6..2820619 100644
--- a/lib/net-support.h
+++ b/lib/net-support.h
@@ -237,7 +237,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