summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2021-09-28 18:11:08 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2021-09-28 18:11:08 +0800
commitcdfbe8ada59c85d9d6a11a0ab4d59a5968cc8178 (patch)
treefd59b93b4e14536b9ab05e089578629af89c4090
parent9be41160825b8238b482208b46bfe16b2f239ce3 (diff)
downloadlibsoup-master.msvc.tar.gz
meson.build: Define ssize_t for MSVC-style buildsmaster.msvc
This is necessary as we are using nghttp2 which uses ssize_t, which is not defined by Microsoft's standard headers, and it is actually a part of POSIX.
-rw-r--r--meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 93ba9d42..5a41b3be 100644
--- a/meson.build
+++ b/meson.build
@@ -48,6 +48,12 @@ common_flags = [
]
cc = meson.get_compiler('c')
+
+# define ssize_t as Microsoft's headers do not define it
+if cc.get_argument_syntax() == 'msvc'
+ add_project_arguments('-Dssize_t=gssize', language: 'c')
+endif
+
# Enable extra warnings if compiler supports them.
if cc.get_id() == 'msvc'
common_flags += ['/FImsvc_recommended_pragmas.h']