summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2000-09-24 10:55:58 +0000
committerBrad Smith <brad@cvs.openbsd.org>2000-09-24 10:55:58 +0000
commitf218a4123854d3772148de344b798c6416a40f3b (patch)
treec425316d62c7e3da446da51d83d227bff3dc838b /usr.sbin/tcpdump
parent457a4fc6915bb4ce3568b76708d6793ef520b2cb (diff)
re-apply this fix for big endian systems, this was lost in rev 1.12
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r--usr.sbin/tcpdump/addrtoname.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/addrtoname.c b/usr.sbin/tcpdump/addrtoname.c
index ed0ea50c737..00be0a1b51b 100644
--- a/usr.sbin/tcpdump/addrtoname.c
+++ b/usr.sbin/tcpdump/addrtoname.c
@@ -23,7 +23,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/addrtoname.c,v 1.13 2000/04/30 05:23:28 ericj Exp $ (LBL)";
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/addrtoname.c,v 1.14 2000/09/24 10:55:57 brad Exp $ (LBL)";
#endif
#include <sys/types.h>
@@ -194,7 +194,7 @@ getname(const u_char *ap)
break;
case 2:
-#ifdef WORDS_BIGENDIAN
+#if BYTE_ORDER == BIG_ENDIAN
addr = ((u_int32_t)*(u_short *)ap << 16) |
(u_int32_t)*(u_short *)(ap + 2);
#else
@@ -204,7 +204,7 @@ getname(const u_char *ap)
break;
default:
-#ifdef WORDS_BIGENDIAN
+#if BYTE_ORDER == BIG_ENDIAN
addr = ((u_int32_t)ap[0] << 24) |
((u_int32_t)ap[1] << 16) |
((u_int32_t)ap[2] << 8) |