[gtk/master.msvc: 43/44] tests/testdnd2.c: Don't include unistd.h unconditionally



commit 74f00a9a25aea49fa26637ae9843faedaca7ed58
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Jan 30 22:34:53 2020 +0800

    tests/testdnd2.c: Don't include unistd.h unconditionally
    
    Instead, on Windows when it is not available, include io.h for close()

 tests/testdnd2.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/tests/testdnd2.c b/tests/testdnd2.c
index 11d604fee5..a9a2f6382f 100644
--- a/tests/testdnd2.c
+++ b/tests/testdnd2.c
@@ -1,6 +1,11 @@
-#include <unistd.h>
 #include <gtk/gtk.h>
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#elif defined (G_OS_WIN32)
+#include <io.h>
+#endif
+
 static GdkTexture *
 get_image_texture (GtkImage *image,
                    int      *out_size)


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