Request X/Open 7 rather than declaring strdup ourselves.
[sort-networks.git] / src / pop_stats.c
index 7a13c82..7f799f8 100644 (file)
  *   Florian octo Forster <ff at octo.it>
  **/
 
+#ifndef _ISOC99_SOURCE
+# define _ISOC99_SOURCE
+#endif
+#ifndef _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 200809L
+#endif
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 700
+#endif
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdint.h>
 
 #include "pop_stats.h"
 
-/* Yes, this is ugly, but the GNU libc doesn't export it with the above flags.
- * */
-char *strdup (const char *s);
-
 struct pop_stats_s /* {{{ */
 {
   pthread_mutex_t lock;