[glib] Don't include unistd.h unconditionally



commit 3c94299b0ff1c8e1b0b06bedd73b1b725e631d8a
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Apr 11 12:57:19 2011 -0400

    Don't include unistd.h unconditionally
    
    It doesn't exist on all platforms. Partial fix for bug 647341.

 gio/glib-compile-schemas.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
index d2c3f77..a301dff 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
@@ -24,12 +24,15 @@
 #include "config.h"
 
 #include <gstdio.h>
-#include <locale.h>
+#include <gi18n.h>
+
 #include <string.h>
-#include <unistd.h>
 #include <stdio.h>
+#include <locale.h>
 
-#include <gi18n.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #include "gvdb/gvdb-builder.h"
 #include "strinfo.c"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]