freebsd-dev/sbin/ping
Matt Jacob c77eed5304 Fix unaligned access faults on alpha.
This one is strange and goes against my rusty compiler knowledge.

The global declaration

struct sockaddr whereto;

produces for both i386 && alpha:

        .comm   whereto,16,1

which means common storage, byte aligned. Ahem. I though structs
were supposed to be ALDOUBLE always? I mean, w/o pragma packed?

Later on, this address is coerced to:

		to = (struct sockaddr_in *)&whereto;

Up until now, we've been fine on alpha because the address
just ended up aligned to a 4 byte boundary. Lately, though,
it end up as:

0000000120027b0f B whereto

And, tra la, you get unaligned access faults. The solution I picked, in
lieu of understanding what the compiler was doing, is to put whereto
as a union of a sockaddr and sockaddr_in. That's more formally correct
if somewhat awkward looking.
2001-07-07 05:01:06 +00:00
..
Makefile - Backout botched attempt to introduce MANSECT feature. 2001-03-26 14:33:27 +00:00
ping.8 Add a -A option to ping which beeps when packets are lost. 2001-05-24 09:17:52 +00:00
ping.c Fix unaligned access faults on alpha. 2001-07-07 05:01:06 +00:00