]> The Tcpdump Group git mirrors - tcpdump/blobdiff - ftmacros.h
CHANGES: Add/move change(s) backported to 4.99
[tcpdump] / ftmacros.h
index c9263f6458a806f2e78b8476e4aea123a56c808a..ba95c4aac1bf648678ba883525d230c721349081 100644 (file)
  * namespace to the maximum extent possible"?
  */
 #if defined(sun) || defined(__sun)
-  #define __EXTENSIONS__
+  /*
+   * On Solaris Clang defines __EXTENSIONS__ automatically.
+   */
+  #ifndef __EXTENSIONS__
+    #define __EXTENSIONS__
+  #endif
 
   /*
    * We also need to define _XPG4_2 in order to get
@@ -59,7 +64,7 @@
   /*
    * We need this to get the versions of socket functions that
    * use socklen_t.  Define it only if it's not already defined,
-   * so we don't get redefiniton warnings.
+   * so we don't get redefinition warnings.
    */
   #ifndef _XOPEN_SOURCE_EXTENDED
     #define _XOPEN_SOURCE_EXTENDED
   #ifndef _DEFAULT_SOURCE
     #define _DEFAULT_SOURCE
   #endif
-  #define _BSD_SOURCE
+  /* Avoid redefining _BSD_SOURCE if it's already defined as for ex. 1 */
+  #ifndef _BSD_SOURCE
+    #define _BSD_SOURCE
+  #endif
 #endif
 
 #endif