]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump-stdinc.h
mind MSVC's UNALIGNED macro (GH #335 pt.2)
[tcpdump] / tcpdump-stdinc.h
index 1e5fc3a9fcf9c1a1fa8f1ce12ee3a0a2128b087f..eb6c9428d9064260a68948128a3a8df3921fa656 100644 (file)
@@ -69,8 +69,6 @@
 #define read _read
 #define close _close
 #define O_RDONLY _O_RDONLY
-
-typedef short ino_t;
 #endif /* __MINGW32__ */
 
 #ifdef __MINGW32__
@@ -173,7 +171,11 @@ typedef char* caddr_t;
  * Note: this also requires that padding be put into the structure,
  * at least for compilers where it's implemented as __attribute__((packed)).
  */
+#if defined(_MSC_VER) && defined(UNALIGNED)
+/* MSVC may have its own macro defined with the same name and purpose. */
+#else
 #define UNALIGNED      __attribute__((packed))
+#endif
 
 #if defined(WIN32) || defined(MSDOS)
   #define FOPEN_READ_TXT   "rt"