--- ./setup.py_orig	2013-06-10 20:39:15 +0600
+++ ./setup.py	2013-06-10 20:41:15 +0600
@@ -1537,6 +1537,14 @@
             macros = dict()
             libraries = []
 
+        elif host_platform == 'aix':
+            macros = dict(                  # AIX5L V5.1 and higher
+                HAVE_SEM_OPEN=1,
+                HAVE_SEM_TIMEDWAIT=0,
+                HAVE_FD_TRANSFER=1
+                )
+            libraries = ['rt']
+
         elif host_platform == 'cygwin':          # Cygwin
             macros = dict()
             libraries = []
--- ./Modules/_multiprocessing/multiprocessing.c_orig	2013-06-10 20:41:49 +0600
+++ ./Modules/_multiprocessing/multiprocessing.c	2013-06-10 20:43:14 +0600
@@ -14,6 +14,13 @@
     #define HAVE_FD_TRANSFER 0
 #endif
 
+#ifndef CMSG_SPACE
+#define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len))
+#endif
+#ifndef CMSG_LEN
+#define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
+#endif
+
 PyObject *create_win32_namespace(void);
 
 PyObject *pickle_dumps, *pickle_loads, *pickle_protocol;
