]> The Tcpdump Group git mirrors - libpcap/commitdiff
Define _DEFAULT_SOURCE *and* _BSD_SOURCE.
authorGuy Harris <[email protected]>
Tue, 28 Nov 2017 05:21:11 +0000 (21:21 -0800)
committerGuy Harris <[email protected]>
Tue, 28 Nov 2017 05:21:11 +0000 (21:21 -0800)
You are in a twisty little maze of Linux distributions and GNU libc
releases, all different.

ftmacros.h

index 4b272d5f23687abb00e6c80c5560e7eec571c56a..de8da98e38b6d0bb71bd82a1f1622e8ad9cdddd4 100644 (file)
    */
   #define _POSIX_C_SOURCE 200809L
   #define _XOPEN_SOURCE 600
+
+  /*
+   * We turn on both _DEFAULT_SOURCE and _BSD_SOURCE to try to get
+   * the BSD u_XXX types, such as u_int and u_short, defined.  We
+   * define _DEFAULT_SOURCE first, so that newer versions of GNU libc
+   * don't whine about _BSD_SOURCE being deprecated; we still have
+   * to define _BSD_SOURCE to handle older versions of GNU libc that
+   * don't support _DEFAULT_SOURCE.
+   */
+  #define _DEFAULT_SOURCE
   #define _BSD_SOURCE
 #endif