--- src/socklib/ipv6sock.cc.orig  2012-10-27 13:50:06.000000000 +0200
+++ src/socklib/ipv6sock.cc   2013-02-06 14:56:03.000000000 +0100
@@ -23,6 +23,12 @@
  *
  *********************************************************************/
 
+#include "config.h"
+
+#ifndef _POSIX_SOURCE
+#  define _POSIX_SOURCE 1
+#endif
+
 #include <sys/types.h>
 #include <netdb.h>
 #include <sys/socket.h>
@@ -30,6 +36,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <strings.h>
+
 extern "C" {
 #include "log.h"
 }