summaryrefslogtreecommitdiff
path: root/tests/test-common.c
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-05-31 17:28:37 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2017-08-08 16:15:33 +0800
commit9b11f357f9f968849c70044eaac5d43713436c94 (patch)
tree88ac89eebb684818e1df2cea37f67fafab2b9452 /tests/test-common.c
parent0940ddc24f7301f09d945ec44360699ce30859c6 (diff)
downloadpango-9b11f357f9f968849c70044eaac5d43713436c94.tar.gz
tests: Don't include unistd.h unconditionally
Don't include unistd.h on Windows, and include io.h if necessary, as Windows compilers may not ship with it. https://bugzilla.gnome.org/show_bug.cgi?id=783274
Diffstat (limited to 'tests/test-common.c')
-rw-r--r--tests/test-common.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test-common.c b/tests/test-common.c
index 17b5df35..adeb4b66 100644
--- a/tests/test-common.c
+++ b/tests/test-common.c
@@ -21,9 +21,15 @@
#include <glib.h>
#include <string.h>
-#include <unistd.h>
+
#include <locale.h>
+#ifdef G_OS_WIN32
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
#include <pango/pangocairo.h>
#include "test-common.h"