Update for 2 digit Linux version numbers (#718610)
This commit is contained in:
parent
d1a18e2bc0
commit
5d62a2fcc5
22
net-tools-1.60-2digit.patch
Normal file
22
net-tools-1.60-2digit.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -up net-tools-1.60/lib/util.c.2digit net-tools-1.60/lib/util.c
|
||||
--- net-tools-1.60/lib/util.c.2digit 1999-01-09 16:55:29.000000000 +0100
|
||||
+++ net-tools-1.60/lib/util.c 2011-07-04 12:35:45.000000000 +0200
|
||||
@@ -33,13 +33,14 @@ void *xrealloc(void *oldp, size_t sz)
|
||||
int kernel_version(void)
|
||||
{
|
||||
struct utsname uts;
|
||||
- int major, minor, patch;
|
||||
+ int ret, major = 0, minor = 0, patch = 0;
|
||||
|
||||
if (uname(&uts) < 0)
|
||||
return -1;
|
||||
- if (sscanf(uts.release, "%d.%d.%d", &major, &minor, &patch) != 3)
|
||||
- return -1;
|
||||
- return KRELEASE(major, minor, patch);
|
||||
+ ret = sscanf(uts.release, "%d.%d.%d", &major, &minor, &patch);
|
||||
+ if (((ret == 3) && (major >= 2)) || ((ret == 2) && (major >= 3)))
|
||||
+ return KRELEASE(major, minor, patch);
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Basic networking tools
|
||||
Name: net-tools
|
||||
Version: 1.60
|
||||
Release: 121%{?dist}
|
||||
Release: 122%{?dist}
|
||||
License: GPL+
|
||||
Group: System Environment/Base
|
||||
URL: http://net-tools.berlios.de/
|
||||
@ -145,6 +145,9 @@ Patch93: net-tools-1.60-netstat-p-basename.patch
|
||||
# Possible problems found by static analysis of code.
|
||||
Patch94: net-tools-1.60-coverity.patch
|
||||
|
||||
# Update for 2 digit Linux version numbers
|
||||
Patch95: net-tools-1.60-2digit.patch
|
||||
|
||||
BuildRequires: gettext, libselinux
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: systemd-units
|
||||
@ -238,6 +241,7 @@ Most of them are obsolete. For replacement check iproute package.
|
||||
%patch92 -p1 -b .plipconfig
|
||||
%patch93 -p1 -b .p-basename
|
||||
%patch94 -p1 -b .coverity
|
||||
%patch95 -p1 -b .2digit
|
||||
|
||||
cp %SOURCE1 ./config.h
|
||||
cp %SOURCE2 ./config.make
|
||||
@ -341,6 +345,9 @@ fi
|
||||
%attr(0644,root,root) %{_unitdir}/arp-ethers.service
|
||||
|
||||
%changelog
|
||||
* Mon Jul 04 2011 Jiri Popelka <jpopelka@redhat.com> - 1.60-122
|
||||
- Update for 2 digit Linux version numbers (#718610)
|
||||
|
||||
* Fri Jun 17 2011 Jiri Popelka <jpopelka@redhat.com> - 1.60-121
|
||||
- Added arp-ethers.service systemd unit file to run 'arp -f /etc/ethers'
|
||||
on startup of system. Don't ship default /etc/ethers (#713759)
|
||||
|
Loading…
Reference in New Issue
Block a user