From 8c8e8b994e0c410824a3db4eee8b31896c203677 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 12 Nov 2005 18:48:54 +0000 Subject: [PATCH] gcc 4 fix. Networking team, please check whether this preserves the intended semantics. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14871 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/traceroute/traceroute.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/traceroute/traceroute.c b/src/bin/traceroute/traceroute.c index 1353cd62bd..b6594f876a 100644 --- a/src/bin/traceroute/traceroute.c +++ b/src/bin/traceroute/traceroute.c @@ -489,8 +489,10 @@ int main(int argc, char **argv) *p++ = lsrrlen - 1; *p++ = IPOPT_MINOFF; gateway[lsrr] = to.sin_addr; - for (i = 1; i <= lsrr; i++) - *((struct in_addr *)p)++ = gateway[i]; + for (i = 1; i <= lsrr; i++) { + *(struct in_addr *)p = gateway[i]; + p = (u_char*)((struct in_addr *)p + 1); + } ip->ip_dst = gateway[0]; } else ip->ip_dst = to.sin_addr;