rpms/iputils/devel iputils-20071127-corr_type.patch, NONE, 1.1 iputils.spec, 1.64, 1.65
Jiri Skala
jskala at fedoraproject.org
Wed Feb 25 22:00:09 UTC 2009
Author: jskala
Update of /cvs/extras/rpms/iputils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19567
Modified Files:
iputils.spec
Added Files:
iputils-20071127-corr_type.patch
Log Message:
* Wed Feb 25 2009 Jiri Skala <jskala at redhat.com> - 20071127-8
- remake type conversions to gcc4.4 requirements
iputils-20071127-corr_type.patch:
--- NEW FILE iputils-20071127-corr_type.patch ---
diff -up iputils-s20071127/ping6.c.corr_type iputils-s20071127/ping6.c
--- iputils-s20071127/ping6.c.corr_type 2009-02-16 14:47:29.000000000 +0100
+++ iputils-s20071127/ping6.c 2009-02-18 09:12:46.000000000 +0100
@@ -775,7 +775,7 @@ parse_reply(struct msghdr *msg, int cc,
#endif
if (c->cmsg_len < CMSG_LEN(sizeof(int)))
continue;
- hops = *(int*)CMSG_DATA(c);
+ memcpy(&hops, CMSG_DATA(c), sizeof (int));
}
}
diff -up iputils-s20071127/ping.c.corr_type iputils-s20071127/ping.c
--- iputils-s20071127/ping.c.corr_type 2009-02-16 13:58:38.000000000 +0100
+++ iputils-s20071127/ping.c 2009-02-16 14:22:49.000000000 +0100
@@ -1193,18 +1193,20 @@ pr_addr(__u32 addr)
struct hostent *hp;
static char buf[4096];
static __u32 addr_cache = 0;
+ struct in_addr tmp_addr;
if ( addr == addr_cache )
return buf;
addr_cache = addr;
+ tmp_addr.s_addr = addr;
if ((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
snprintf(buf, sizeof(buf), "%s (%s)", hp->h_name,
- inet_ntoa(*(struct in_addr *)&addr));
+ inet_ntoa(tmp_addr));
return(buf);
}
diff -up iputils-s20071127/rdisc.c.corr_type iputils-s20071127/rdisc.c
--- iputils-s20071127/rdisc.c.corr_type 2009-02-18 11:04:14.000000000 +0100
+++ iputils-s20071127/rdisc.c 2009-02-18 13:32:41.000000000 +0100
@@ -1476,14 +1476,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 -up iputils-s20071127/tracepath6.c.corr_type iputils-s20071127/tracepath6.c
--- iputils-s20071127/tracepath6.c.corr_type 2009-02-18 13:57:54.000000000 +0100
+++ iputils-s20071127/tracepath6.c 2009-02-18 13:58:47.000000000 +0100
@@ -126,7 +126,7 @@ restart:
#ifdef IPV6_2292HOPLIMIT
case IPV6_2292HOPLIMIT:
#endif
- rethops = *(int*)CMSG_DATA(cmsg);
+ memcpy(&rethops, CMSG_DATA(cmsg), sizeof (int));
break;
}
} else if (cmsg->cmsg_level == SOL_IP) {
diff -up iputils-s20071127/tracepath.c.corr_type iputils-s20071127/tracepath.c
--- iputils-s20071127/tracepath.c.corr_type 2009-02-18 13:53:20.000000000 +0100
+++ iputils-s20071127/tracepath.c 2009-02-18 13:50:24.000000000 +0100
@@ -128,7 +128,7 @@ restart:
if (cmsg->cmsg_type == IP_RECVERR) {
e = (struct sock_extended_err *) CMSG_DATA(cmsg);
} else if (cmsg->cmsg_type == IP_TTL) {
- rethops = *(int*)CMSG_DATA(cmsg);
+ memcpy(&rethops, CMSG_DATA(cmsg), sizeof(int));
} else {
printf("cmsg:%d\n ", cmsg->cmsg_type);
}
Index: iputils.spec
===================================================================
RCS file: /cvs/extras/rpms/iputils/devel/iputils.spec,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- iputils.spec 25 Feb 2009 07:50:41 -0000 1.64
+++ iputils.spec 25 Feb 2009 21:59:39 -0000 1.65
@@ -1,7 +1,7 @@
Summary: Network monitoring tools including ping
Name: iputils
Version: 20071127
-Release: 7%{?dist}
+Release: 8%{?dist}
License: BSD
URL: http://www.skbuff.net/iputils
Group: System Environment/Daemons
@@ -25,6 +25,7 @@
Patch12: iputils-20070202-ia64_align.patch
Patch13: iputils-20071127-warnings.patch
Patch14: iputils-20071127-typing_bug.patch
+Patch15: iputils-20071127-corr_type.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: docbook-utils perl-SGMLSpm
@@ -59,6 +60,7 @@
%patch12 -p1 -b .ia64_align
%patch13 -p1 -b .warnings
%patch14 -p1 -b .typing_bug
+%patch15 -p1 -b .corr_type
%build
%ifarch s390 s390x
@@ -148,6 +150,9 @@
%{_sysconfdir}/rc.d/init.d/rdisc
%changelog
+* Wed Feb 25 2009 Jiri Skala <jskala at redhat.com> - 20071127-8
+- remake type conversions to gcc4.4 requirements
+
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 20071127-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
More information about the scm-commits
mailing list