scons: Define _DARWIN_C_SOURCE on Darwin builds.
diff --git a/SConstruct b/SConstruct
index f43c10c..455b471 100644
--- a/SConstruct
+++ b/SConstruct
@@ -110,6 +110,8 @@
 		'PTHREADS',
 		'HAVE_POSIX_MEMALIGN',
 	])
+	if platform == 'darwin':
+		env.Append(CPPDEFINES = ['_DARWIN_C_SOURCE'])
 	env.Append(CPPPATH = ['/usr/X11R6/include'])
 	env.Append(LIBPATH = ['/usr/X11R6/lib'])
 	env.Append(LIBS = [