# define MACOSX
#endif
+// Create our own define for Solaris
+#if defined(__sun__) && defined(__svr4__)
+# define SUNOS
+#endif
+
+#ifdef SUNOS
+# define FNDELAY O_NDELAY // FNDELAY's equivalent on SunOS is O_NDELAY
+# define model_t dp_model_t // Workaround conflict with /usr/include/sys/model.h
+#endif
//============================================================================
# if defined(WIN32)
# define BYTE_ORDER LITTLE_ENDIAN
# else
-# warning "Unable to determine the CPU endianess. Defaulting to little endian"
-# define BYTE_ORDER LITTLE_ENDIAN
+# if defined(SUNOS)
+# if defined(__i386) || defined(__amd64)
+# define BYTE_ORDER LITTLE_ENDIAN
+# else
+# define BYTE_ORDER BIG_ENDIAN
+# endif
+# else
+# warning "Unable to determine the CPU endianess. Defaulting to little endian"
+# define BYTE_ORDER LITTLE_ENDIAN
+# endif
# endif
#endif