Fix handling of HAVE_* flags ifdef vs if. (BerliOS #17812)
This commit is contained in:
parent
724487e8ec
commit
cfd3d7d75a
74
net-tools-1.60-ifdef-vs-if.patch
Normal file
74
net-tools-1.60-ifdef-vs-if.patch
Normal file
@ -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 <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
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Basic networking tools
|
Summary: Basic networking tools
|
||||||
Name: net-tools
|
Name: net-tools
|
||||||
Version: 1.60
|
Version: 1.60
|
||||||
Release: 111%{?dist}
|
Release: 112%{?dist}
|
||||||
License: GPL+
|
License: GPL+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://net-tools.berlios.de/
|
URL: http://net-tools.berlios.de/
|
||||||
@ -135,6 +135,9 @@ Patch88: net-tools-1.60-netstat-leak.patch
|
|||||||
# HFI support
|
# HFI support
|
||||||
Patch89: net-tools-1.60-hfi.patch
|
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: gettext, libselinux
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
Requires: hostname
|
Requires: hostname
|
||||||
@ -228,6 +231,7 @@ Most of them are obsolete. For replacement check iproute package.
|
|||||||
%patch87 -p1 -b .mii-gigabit
|
%patch87 -p1 -b .mii-gigabit
|
||||||
%patch88 -p1 -b .netstat-leak
|
%patch88 -p1 -b .netstat-leak
|
||||||
%patch89 -p1 -b .hfi
|
%patch89 -p1 -b .hfi
|
||||||
|
%patch90 -p1 -b .ifdef-vs-if
|
||||||
|
|
||||||
cp %SOURCE1 ./config.h
|
cp %SOURCE1 ./config.h
|
||||||
cp %SOURCE2 ./config.make
|
cp %SOURCE2 ./config.make
|
||||||
@ -327,6 +331,9 @@ rm -rf %{buildroot}
|
|||||||
%config(noreplace) %{_sysconfdir}/ethers
|
%config(noreplace) %{_sysconfdir}/ethers
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 03 2011 Jiri Popelka <jpopelka@redhat.com> - 1.60-112
|
||||||
|
- Fix the handling of some of the HAVE_* flags ifdef vs if. (BerliOS #17812)
|
||||||
|
|
||||||
* Thu Dec 16 2010 Jiri Popelka <jpopelka@redhat.com> - 1.60-111
|
* Thu Dec 16 2010 Jiri Popelka <jpopelka@redhat.com> - 1.60-111
|
||||||
- fixed mii-diag(8) man page (#663689)
|
- fixed mii-diag(8) man page (#663689)
|
||||||
- fixed route(8) man page (#664171)
|
- fixed route(8) man page (#664171)
|
||||||
|
Loading…
Reference in New Issue
Block a user