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



commit 201bdf6915fff615774801ee8f2c1d5052abac78
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 ecf5a95551..f9df0f4367 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 GdkPaintable *
 get_image_paintable (GtkImage *image,
                     int      *out_size)


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