From bd5ae6077da9ef79d01439b9da8507a193db2a40 Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Tue, 27 Nov 2012 13:49:12 +0100 Subject: [PATCH] Drop corr_type patch (gcc 4.4 build hack) --- iputils-20071127-corr_type.patch | 53 -------------------------------- iputils.spec | 3 +- 2 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 iputils-20071127-corr_type.patch diff --git a/iputils-20071127-corr_type.patch b/iputils-20071127-corr_type.patch deleted file mode 100644 index 51906c9..0000000 --- a/iputils-20071127-corr_type.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- iputils-s20121112/ping.c.orig 2012-11-13 10:35:16.000000000 +0100 -+++ iputils-s20121112/ping.c 2012-11-13 10:40:38.512144804 +0100 -@@ -1226,12 +1226,14 @@ pr_addr(__u32 addr) - { - struct hostent *hp; - static char buf[4096]; -+ struct in_addr tmp_addr; - - in_pr_addr = !setjmp(pr_addr_jmp); -+ tmp_addr.s_addr = addr; - - if (exiting || (options & F_NUMERIC) || - !(hp = gethostbyaddr((char *)&addr, 4, AF_INET))) -- sprintf(buf, "%s", inet_ntoa(*(struct in_addr *)&addr)); -+ sprintf(buf, "%s", inet_ntoa(tmp_addr)); - else { - char *s; - #if USE_IDN -@@ -1241,7 +1243,7 @@ pr_addr(__u32 addr) - s = NULL; - #endif - snprintf(buf, sizeof(buf), "%s (%s)", s ? s : hp->h_name, -- inet_ntoa(*(struct in_addr *)&addr)); -+ inet_ntoa(tmp_addr)); - #if USE_IDN - free(s); - #endif -diff -up iputils-s20100418/rdisc.c.corr_type iputils-s20100418/rdisc.c ---- iputils-s20100418/rdisc.c.corr_type 2010-04-18 06:45:45.000000000 +0200 -+++ iputils-s20100418/rdisc.c 2010-04-20 15:42:39.201230377 +0200 -@@ -1487,14 +1487,19 @@ rtioctl(struct in_addr addr, int op) - { - int sock; - struct rtentry rt; -- struct sockaddr_in *sin; -+ union { -+ struct sockaddr *sa; -+ struct sockaddr_in *sin; -+ } conv; - - memset((char *)&rt, 0, sizeof(struct rtentry)); - rt.rt_dst.sa_family = AF_INET; - rt.rt_gateway.sa_family = AF_INET; - rt.rt_genmask.sa_family = AF_INET; -- sin = (struct sockaddr_in *)ALLIGN(&rt.rt_gateway); -- sin->sin_addr = addr; -+ // gcc4.4 hack -+ conv.sa = ALLIGN(&rt.rt_gateway); -+ memcpy(&conv.sin->sin_addr, &addr, sizeof(struct in_addr)); -+ // ----------- - rt.rt_flags = RTF_UP | RTF_GATEWAY; - - sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); diff --git a/iputils.spec b/iputils.spec index baebb09..acf89db 100644 --- a/iputils.spec +++ b/iputils.spec @@ -18,7 +18,6 @@ Patch0: iputils-20020927-rh.patch Patch2: iputils-20020927-ping-subint.patch Patch3: iputils-ifenslave.patch Patch4: iputils-20121112-idn.patch -Patch5: iputils-20071127-corr_type.patch Patch7: iputils-20121121-ifaddrs.patch Patch8: iputils-20121125-usage-before-caps.patch @@ -62,7 +61,6 @@ The iputils-sysvinit contains SysV initscritps support. %patch2 -p1 -b .ping-subint %patch3 -p1 -b .addr %patch4 -p1 -b .idn -%patch5 -p1 -b .corr_type %patch7 -p1 -b .ifaddrs %patch8 -p1 -b .usage-before-caps @@ -152,6 +150,7 @@ mv -f RELNOTES.tmp RELNOTES - Update ifaddrs patch - Call usage() before limiting capabilities - Correct ifaddrs patch +- Drop corr_type patch (gcc 4.4 build hack) * Mon Nov 26 2012 Jan Synáček - 20121125-1 - Update to iputils-s20121125 (#879952)