[gtk/wip.win32.fixes: 24/25] gtksecurememory.c: Don't include unistd.h unconditionally




commit ed0443ef31cd7bc67e06f718654a964c4f0858a0
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Sep 9 09:39:58 2020 +0800

    gtksecurememory.c: Don't include unistd.h unconditionally
    
    It is not universally available on non-POSIX systems.

 gtk/gtksecurememory.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtksecurememory.c b/gtk/gtksecurememory.c
index 55db84398b..5e3978ec28 100644
--- a/gtk/gtksecurememory.c
+++ b/gtk/gtksecurememory.c
@@ -44,7 +44,11 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+
 #include <assert.h>
 
 #ifdef WITH_VALGRIND


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