diff -Naur glib-2.24.2.orig/gio/gsocket.c glib-2.24.2.ref/gio/gsocket.c
--- glib-2.24.2.orig/gio/gsocket.c	2010-08-08 09:47:15.000000000 -0500
+++ glib-2.24.2.ref/gio/gsocket.c	2011-01-11 14:47:10.945362000 -0600
@@ -55,6 +55,17 @@
 
 #include "gioalias.h"
 
+/* These macros are not defined on all systems, so define them here if missing */
+
+#ifndef CMSG_SPACE
+#define CMSG_SPACE(l) ((unsigned int)_CMSG_HDR_ALIGN(sizeof (struct cmsghdr) + (l)))
+#endif
+
+#ifndef CMSG_LEN
+#define CMSG_LEN(l) ((unsigned int)_CMSG_DATA_ALIGN(sizeof (struct cmsghdr)) + (l))
+#endif
+
+
 /**
  * SECTION:gsocket
  * @short_description: Low-level socket object
