#ifndef tcpdump_stdinc_h
#define tcpdump_stdinc_h
+#include <errno.h>
+
#ifdef WIN32
-#ifdef __MINGW32__
#include <stdint.h>
-#endif
-
#include <stdio.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <ctype.h>
#include <time.h>
#include <io.h>
-#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <net/netdb.h> /* in wpcap's Win32/include */
-#ifndef NBBY
-#define NBBY 8
-#endif
-
#ifndef uint8_t
#define uint8_t unsigned char
#endif
* Note: this also requires that padding be put into the structure,
* at least for compilers where it's implemented as __attribute__((packed)).
*/
-#if defined(__GNUC__)
+#if !(defined(_MSC_VER) && defined(UNALIGNED))
+/* MSVC may have its own macro defined with the same name and purpose. */
#undef UNALIGNED
#define UNALIGNED __attribute__((packed))
-#else
- /* MSVC may have its own macro defined with the same name and purpose. */
#endif
#if defined(WIN32) || defined(MSDOS)