From cfd3d7d75ac188eab389a67bc12128b1540ea9ed Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Jan 03 2011 11:48:56 +0000 Subject: Fix handling of HAVE_* flags ifdef vs if. (BerliOS #17812) --- diff --git a/net-tools-1.60-ifdef-vs-if.patch b/net-tools-1.60-ifdef-vs-if.patch new file mode 100644 index 0000000..526b13c --- /dev/null +++ b/net-tools-1.60-ifdef-vs-if.patch @@ -0,0 +1,74 @@ +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 + + +-#ifdef HAVE_HWSLIP ++#if HAVE_HWSLIP + #include + #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 + #endif + +-#ifdef HAVE_HWSLIP ++#if HAVE_HWSLIP + #include + #include + #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 diff --git a/net-tools.spec b/net-tools.spec index 1dbfaef..25b9602 100644 --- a/net-tools.spec +++ b/net-tools.spec @@ -1,7 +1,7 @@ Summary: Basic networking tools Name: net-tools Version: 1.60 -Release: 111%{?dist} +Release: 112%{?dist} License: GPL+ Group: System Environment/Base URL: http://net-tools.berlios.de/ @@ -135,6 +135,9 @@ Patch88: net-tools-1.60-netstat-leak.patch # HFI support Patch89: net-tools-1.60-hfi.patch +# Fix the handling of some of the HAVE_* flags ifdef vs if. (BerliOS #17812) +Patch90: net-tools-1.60-ifdef-vs-if.patch + BuildRequires: gettext, libselinux BuildRequires: libselinux-devel Requires: hostname @@ -228,6 +231,7 @@ Most of them are obsolete. For replacement check iproute package. %patch87 -p1 -b .mii-gigabit %patch88 -p1 -b .netstat-leak %patch89 -p1 -b .hfi +%patch90 -p1 -b .ifdef-vs-if cp %SOURCE1 ./config.h cp %SOURCE2 ./config.make @@ -327,6 +331,9 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/ethers %changelog +* Mon Jan 03 2011 Jiri Popelka - 1.60-112 +- Fix the handling of some of the HAVE_* flags ifdef vs if. (BerliOS #17812) + * Thu Dec 16 2010 Jiri Popelka - 1.60-111 - fixed mii-diag(8) man page (#663689) - fixed route(8) man page (#664171)