[libdispatch-dev] [PATCH] testing/dispatch_test.c
Mario Schwalbe
schwalbe at inf.tu-dresden.de
Mon Nov 16 06:10:41 PST 2009
Hi,
to get a prototype for apsintf in order to compile testing/dispatch_test.c on Linux.
ciao,
Mario
Index: testing/dispatch_test.c
===================================================================
--- testing/dispatch_test.c (Revision 165)
+++ testing/dispatch_test.c (Arbeitskopie)
@@ -4,6 +4,19 @@
#include <sys/wait.h>
#include <stdarg.h>
+
+#if defined(__linux__)
+ /* needed to get a prototype for asprintf */
+ #define __USE_GNU
+ /*
+ * __USE_GNU also enables a prototype for fopencookie using the type
+ * _IO_cookie_io_functions_t which is only defined in libio.h
+ * included with _GNU_SOURCE defined
+ */
+ #define _GNU_SOURCE
+ #include <libio.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
More information about the libdispatch-dev
mailing list