# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/netkit-base/hotfix-64bit-alignment.patch # Copyright (C) 2004 - 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- At least on sparc64 gcc optimized the memcpy into 2 32bit load/stores. However the data does not match that alignment requirements, the program receivees a SIGBUS. I'm not sure if this is a misoptimization bug in gcc ... - Rene Rebe diff -ur netkit-base-0.17/ping/ping.c netkit-base-0.17-fixed/ping/ping.c --- netkit-base-0.17/ping/ping.c 2000-07-23 06:16:21.000000000 +0200 +++ netkit-base-0.17-fixed/ping/ping.c 2005-01-29 17:53:55.000000000 +0100 @@ -673,7 +673,7 @@ { struct ip *ip; struct icmp *icp; - struct timeval now, packettv, *tp; + struct timeval now, packettv; long triptime = 0; int hlen, dupflag; int rv; @@ -722,8 +722,7 @@ return 0; /* 'Twas not our ECHO */ nreceived++; if (timing) { - tp = (struct timeval *)icp->icmp_data; - memcpy(&packettv, tp, sizeof(struct timeval)); + memcpy(&packettv, icp->icmp_data, sizeof(struct timeval)); tvsub(&now, &packettv); /* precision: tenths of milliseconds */