--- sendmsg.c	2012-09-03 14:43:13.000000000 +0200
+++ sendmsg.c.patched	2012-09-03 14:43:00.000000000 +0200
@@ -11,11 +11,16 @@
  * your Python version.  */
 typedef int Py_ssize_t;
 #endif
 
 #include <sys/types.h>
-#include <sys/socket.h>
+#if defined(_AIX)
+# define _LINUX_SOURCE_COMPAT
+# include <sys/socket.h>
+#else
+# include <sys/socket.h>
+#endif
 #include <signal.h>
 
 /*
  * As per
  * <http://pubs.opengroup.org/onlinepubs/007904875/basedefs/sys/socket.h.html
