diff --git a/src/include/port/aix.h b/src/include/port/aix.h
index 30b9a18493b71cdcb1464a0d5b74aa5be6d4c7dc..25d33eb87b85d95afb7cf82c8adb475f2f79652c 100644
--- a/src/include/port/aix.h
+++ b/src/include/port/aix.h
@@ -5,3 +5,4 @@
 #  define HAVE_ANSI_CPP
 #  define HAS_TEST_AND_SET
    typedef unsigned int slock_t;
+#include <sys/machine.h>	/* ENDIAN definitions for network communication */
diff --git a/src/include/port/dgux.h b/src/include/port/dgux.h
index e99e3dbc2ca44bd2c1bc43acfb341e277cedb7e9..4d95ea3160fb893888e642d96ddc7de3dd0f82d6 100644
--- a/src/include/port/dgux.h
+++ b/src/include/port/dgux.h
@@ -1,7 +1,17 @@
 #define LINUX_ELF
 #define USE_POSIX_SIGNALS
 #define USE_POSIX_TIME
-#ifndef         BYTE_ORDER
-# define         BYTE_ORDER      BIG_ENDIAN
+
+#ifndef		BIG_ENDIAN
+#define		BIG_ENDIAN	4321
+#endif
+#ifndef		LITTLE_ENDIAN
+#define		LITTLE_ENDIAN	1234
+#endif
+#ifndef		PDP_ENDIAN
+#define		PDP_ENDIAN	3412
+#endif
+#ifndef		BYTE_ORDER
+#define		BYTE_ORDER	BIG_ENDIAN
 #endif
 
diff --git a/src/include/port/i386_solaris.h b/src/include/port/i386_solaris.h
index 0ac1116f06f9fde6a1ba2c91fa0eace54f21d8ac..c4070f1381d4542b70639e80bd8d162ecd481f07 100644
--- a/src/include/port/i386_solaris.h
+++ b/src/include/port/i386_solaris.h
@@ -7,8 +7,17 @@
 
 #include <sys/isa_defs.h>
 
-#ifndef         BYTE_ORDER
-#define         BYTE_ORDER      LITTLE_ENDIAN
+#ifndef		BIG_ENDIAN
+#define		BIG_ENDIAN	4321
+#endif
+#ifndef		LITTLE_ENDIAN
+#define		LITTLE_ENDIAN	1234
+#endif
+#ifndef		PDP_ENDIAN
+#define		PDP_ENDIAN      3412
+#endif
+#ifndef		BYTE_ORDER
+#define		BYTE_ORDER	LITTLE_ENDIAN
 #endif
 
 #ifndef         NAN
diff --git a/src/include/port/sparc_solaris.h b/src/include/port/sparc_solaris.h
index 25746c62669a7db9930a7d4e09925a4a58f7a9ac..9e7a6b7775c1b22da72fbc3fc0c21f8facaa7859 100644
--- a/src/include/port/sparc_solaris.h
+++ b/src/include/port/sparc_solaris.h
@@ -5,6 +5,15 @@
 #  define HAS_TEST_AND_SET
    typedef unsigned char slock_t;
 
+#ifndef		BIG_ENDIAN
+#define		BIG_ENDIAN	4321
+#endif
+#ifndef		LITTLE_ENDIAN
+#define		LITTLE_ENDIAN	1234
+#endif
+#ifndef		PDP_ENDIAN
+#define		PDP_ENDIAN	3412
+#endif
 #ifndef		BYTE_ORDER
 #define		BYTE_ORDER	BIG_ENDIAN
 #endif
diff --git a/src/include/port/sunos4.h b/src/include/port/sunos4.h
index c1ec7f506108311b21b0999b75855e43b5560bbd..d395cbdbe12133f0bfc08c19d4db145f3d927678 100644
--- a/src/include/port/sunos4.h
+++ b/src/include/port/sunos4.h
@@ -1,5 +1,14 @@
 #define USE_POSIX_TIME
-#ifndef               BYTE_ORDER
-#  define               BYTE_ORDER      BIG_ENDIAN
-#endif
 
+#ifndef		BIG_ENDIAN
+#define		BIG_ENDIAN	4321
+#endif
+#ifndef		LITTLE_ENDIAN
+#define		LITTLE_ENDIAN	1234
+#endif
+#ifndef		PDP_ENDIAN
+#define		PDP_ENDIAN	3412
+#endif
+#ifndef		BYTE_ORDER
+#define		BYTE_ORDER	BIG_ENDIAN
+#endif
diff --git a/src/include/port/ultrix4.h b/src/include/port/ultrix4.h
index c050965d5b008e1da171d36280b9f2056b1c4213..38cce4d257fa2628ad74379fef52ebfa9b3833a9 100644
--- a/src/include/port/ultrix4.h
+++ b/src/include/port/ultrix4.h
@@ -1,6 +1,15 @@
 #  define USE_POSIX_TIME
 #  define NEED_STRDUP
 
+#ifndef		BIG_ENDIAN
+#define		BIG_ENDIAN	4321
+#endif
+#ifndef		LITTLE_ENDIAN
+#define		LITTLE_ENDIAN	1234
+#endif
+#ifndef		PDP_ENDIAN
+#define		PDP_ENDIAN	3412
+#endif
 #ifndef		BYTE_ORDER
 #define		BYTE_ORDER	LITTLE_ENDIAN
 #endif
diff --git a/src/include/port/univel.h b/src/include/port/univel.h
index f1a7afc83bb40ce84e4b047f484627bdf93e777a..9ce1fef1ccdd4f93a3b0f5e1b80006f7d50b7b1e 100644
--- a/src/include/port/univel.h
+++ b/src/include/port/univel.h
@@ -13,6 +13,15 @@ extern void srandom(int seed);
 extern int strcasecmp(char *s1,char *s2);
 extern int gethostname(char *name,int namelen);
 
+#ifndef		BIG_ENDIAN
+#define		BIG_ENDIAN	4321
+#endif
+#ifndef		LITTLE_ENDIAN
+#define		LITTLE_ENDIAN	1234
+#endif
+#ifndef		PDP_ENDIAN
+#define		PDP_ENDIAN	3412
+#endif
 #ifndef		BYTE_ORDER
 #define		BYTE_ORDER	LITTLE_ENDIAN
 #endif