summaryrefslogtreecommitdiffstats
path: root/sbin/ping/ping.c
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2007-05-21 14:38:45 +0000
committercognet <cognet@FreeBSD.org>2007-05-21 14:38:45 +0000
commitfc0e827f1a4e8effc91a9aadc66346fe5e5846a5 (patch)
treef422c0ecc7bd0250c13389dd62a48385a5779829 /sbin/ping/ping.c
parentdb660a6fa58f05d584ed84e9546a922bae6df6fe (diff)
downloadFreeBSD-src-fc0e827f1a4e8effc91a9aadc66346fe5e5846a5.zip
FreeBSD-src-fc0e827f1a4e8effc91a9aadc66346fe5e5846a5.tar.gz
Force the alignment of the chars arrays, as they are casted later to
structs. gcc 4.2 doesn't do it by default, and that results in unaligned access on arm.
Diffstat (limited to 'sbin/ping/ping.c')
-rw-r--r--sbin/ping/ping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 90e2869..be5f66e 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -226,7 +226,7 @@ main(argc, argv)
struct msghdr msg;
struct sigaction si_sa;
size_t sz;
- u_char *datap, packet[IP_MAXPACKET];
+ u_char *datap, packet[IP_MAXPACKET] __aligned(4);
char *ep, *source, *target, *payload;
struct hostent *hp;
#ifdef IPSEC_POLICY_IPSEC
OpenPOWER on IntegriCloud