Drop corr_type patch (gcc 4.4 build hack)

This commit is contained in:
Jan Synacek 2012-11-27 13:49:12 +01:00
parent 1281388c33
commit bd5ae6077d
2 changed files with 1 additions and 55 deletions

View File

@ -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);

View File

@ -18,7 +18,6 @@ Patch0: iputils-20020927-rh.patch
Patch2: iputils-20020927-ping-subint.patch Patch2: iputils-20020927-ping-subint.patch
Patch3: iputils-ifenslave.patch Patch3: iputils-ifenslave.patch
Patch4: iputils-20121112-idn.patch Patch4: iputils-20121112-idn.patch
Patch5: iputils-20071127-corr_type.patch
Patch7: iputils-20121121-ifaddrs.patch Patch7: iputils-20121121-ifaddrs.patch
Patch8: iputils-20121125-usage-before-caps.patch Patch8: iputils-20121125-usage-before-caps.patch
@ -62,7 +61,6 @@ The iputils-sysvinit contains SysV initscritps support.
%patch2 -p1 -b .ping-subint %patch2 -p1 -b .ping-subint
%patch3 -p1 -b .addr %patch3 -p1 -b .addr
%patch4 -p1 -b .idn %patch4 -p1 -b .idn
%patch5 -p1 -b .corr_type
%patch7 -p1 -b .ifaddrs %patch7 -p1 -b .ifaddrs
%patch8 -p1 -b .usage-before-caps %patch8 -p1 -b .usage-before-caps
@ -152,6 +150,7 @@ mv -f RELNOTES.tmp RELNOTES
- Update ifaddrs patch - Update ifaddrs patch
- Call usage() before limiting capabilities - Call usage() before limiting capabilities
- Correct ifaddrs patch - Correct ifaddrs patch
- Drop corr_type patch (gcc 4.4 build hack)
* Mon Nov 26 2012 Jan Synáček <jsynacek@redhat.com> - 20121125-1 * Mon Nov 26 2012 Jan Synáček <jsynacek@redhat.com> - 20121125-1
- Update to iputils-s20121125 (#879952) - Update to iputils-s20121125 (#879952)