-fix double free, linker issue
[oweals/gnunet.git] / src / include / platform.h
index 1795037313fdc292728f68bf4197b4551b762d63..d0591b107f177fee40f1a33723d81f832037ae6f 100644 (file)
 #include <stdarg.h>
 #include <errno.h>
 #include <signal.h>
+#include <libgen.h>
 #ifdef WINDOWS
 #include <malloc.h>             /* for alloca(), on other OSes it's in stdlib.h */
 #endif
 #include <semaphore.h>
 #include <net/if.h>
 #endif
-#ifdef LINUX
+#if defined(LINUX) || defined(GNU)
 #include <net/if.h>
 #endif
 #ifdef SOLARIS
@@ -240,6 +241,14 @@ atoll (const char *nptr);
 #define O_LARGEFILE 0
 #endif
 
+/**
+ * AI_NUMERICSERV not defined in windows.  Then we just do without.
+ */
+#ifndef AI_NUMERICSERV
+#define AI_NUMERICSERV 0
+#endif
+
+
 #if defined(__sparc__)
 #define MAKE_UNALIGNED(val) ({ __typeof__((val)) __tmp; memmove(&__tmp, &(val), sizeof((val))); __tmp; })
 #else