summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump/addrtoname.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-10-06 01:46:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-10-06 01:46:41 +0000
commitaaf7575b9efe6d4fec45928081db200e34f9929a (patch)
tree49f252917f2f591a258e6fcb0fab7c88b6a89581 /usr.sbin/tcpdump/addrtoname.c
parente45346e40f12bc8137f803e31c367f470180c8e0 (diff)
big endian fixes; ryker, jd@noc7.uchsc.edu
Diffstat (limited to 'usr.sbin/tcpdump/addrtoname.c')
-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 01b995ef252..cd7d88d1990 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.8 1999/09/16 20:58:44 brad Exp $ (LBL)";
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/addrtoname.c,v 1.9 1999/10/06 01:46:40 deraadt Exp $ (LBL)";
#endif
#include <sys/types.h>
@@ -176,7 +176,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
@@ -186,7 +186,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) |