#include <sys/types.h>
#include <net/netdb.h> /* in wpcap's Win32/include */
+#ifndef NBBY
+#define NBBY 8
+#endif
+
#if !defined(__MINGW32__) && !defined(__WATCOMC__)
#undef toascii
#define isascii __isascii
#define FOPEN_WRITE_BIN FOPEN_WRITE_TXT
#endif
-#if defined(__GNUC__) && defined(__i386__) && !defined(__ntohl)
+#if defined(__GNUC__) && defined(__i386__) && !defined(__APPLE__) && !defined(__ntohl)
#undef ntohl
#undef ntohs
#undef htonl