]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap/compiler-tests.h
Handle older OSes without DLT_PRISM_HEADER/DLT_AIRONET_HEADER/DLT_PPI.
[libpcap] / pcap / compiler-tests.h
index a184f6b0ec4d2c7ead7022e50b00cce026e35d08..ea5962c7bf5e6849521167db95274ec81f06576b 100644 (file)
         (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
 #endif
 
+/*
+ * Check whether this is Clang major.minor or a later release.
+ */
+
+#if !defined(__clang__)
+#define PCAP_IS_AT_LEAST_CLANG_VERSION(major, minor) 0
+#else
+#define PCAP_IS_AT_LEAST_CLANG_VERSION(major, minor) \
+       (__clang_major__ > (major) || \
+        (__clang_major__ == (major) && __clang_minor__ >= (minor)))
+#endif
+
 /*
  * Check whether this is Sun C/SunPro C/Oracle Studio major.minor
  * or a later release.
        (__HP_aCC >= ((major)*10000 + (minor)*100))
 #endif
 
-#endif /* lib_pcap_funcattrs_h */
+#endif /* lib_pcap_compiler_tests_h */