diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-02-07 11:39:29 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-02-07 18:59:13 +0800 |
commit | d97be101490a46c72f919d3dc45f4bc06e625e0c (patch) | |
tree | 26ef5a3550f94438ea1837755bfa25c16b2dd88f /json-glib/json-glib-validate.c | |
parent | 0b1397ad168078bf2b588ab413ad921c04aab8a2 (diff) | |
download | json-glib-d97be101490a46c72f919d3dc45f4bc06e625e0c.tar.gz |
tools: Fix build on Visual Studio
As unistd.h is not universally available, don't include it unconditionally
and include the corresponding Windows headers where necessary. Also, use
gssize in place of ssize_t and define STDOUT_FILENO on Windows when we
don't have unistd.h, which is a constant that is defined in unistd.h.
https://bugzilla.gnome.org/show_bug.cgi?id=723813
Diffstat (limited to 'json-glib/json-glib-validate.c')
-rw-r--r-- | json-glib/json-glib-validate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/json-glib/json-glib-validate.c b/json-glib/json-glib-validate.c index 97bd53d..2eb013a 100644 --- a/json-glib/json-glib-validate.c +++ b/json-glib/json-glib-validate.c @@ -23,7 +23,9 @@ #include "config.h" +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif #include <stdlib.h> #include <stdio.h> #include <locale.h> |