--- glib-2.21.4/gio/gsocket.c	2009-07-03 21:04:22.000000000 +0200
+++ glib-2.21.4-patched/gio/gsocket.c	2009-07-31 10:43:49.595640000 +0200
@@ -55,6 +55,17 @@
 
 #include "gioalias.h"
 
+/* Required yet non-standard cmsg functions */
+#ifndef CMSG_ALIGN
+# define CMSG_ALIGN(len) (((len) + sizeof(intptr_t)-1) & ~(sizeof(intptr_t)-1))
+#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
+
 /**
  * SECTION:gsocket
  * @short_description: Low-level socket object
