Request X/Open 7 rather than declaring strdup ourselves.
[sort-networks.git] / src / pop_stats.c
index bdad39b..7f799f8 100644 (file)
@@ -1,6 +1,6 @@
 /**
- * collectd - src/pop_stats.c
- * Copyright (C) 2009  Florian octo Forster
+ * libsortnetwork - src/pop_stats.c
+ * Copyright (C) 2009-2010  Florian octo Forster
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  *
  * Authors:
- *   Florian octo Forster <octo at verplant.org>
+ *   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;