]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
meson: add header to size_t check
authorRosen Penev <rosenp@gmail.com>
Tue, 4 Nov 2025 18:38:54 +0000 (10:38 -0800)
committerRosen Penev <rosenp@gmail.com>
Tue, 4 Nov 2025 18:45:20 +0000 (10:45 -0800)
Might be needed under MSVC.

meson.build

index 43277e11062e2113c5e7867a660640bf1849ec8c..91c82a4536521b84ac57275a380a341eadbc05da 100644 (file)
@@ -175,7 +175,7 @@ conf_data.set('SIZEOF_INT', cc.sizeof('int'))
 conf_data.set('SIZEOF_INT64_T', cc.sizeof('int64_t', prefix : '#include <stdint.h>'))
 conf_data.set('SIZEOF_LONG', cc.sizeof('long'))
 conf_data.set('SIZEOF_LONG_LONG', cc.sizeof('long long'))
-conf_data.set('SIZEOF_SIZE_T', cc.sizeof('size_t'))
+conf_data.set('SIZEOF_SIZE_T', cc.sizeof('size_t', prefix : '#include <stddef.h'))
 if cc.get_argument_syntax() == 'msvc'
   conf_data.set('SIZEOF_SSIZE_T', cc.sizeof('SSIZE_T', prefix : '#include <BaseTsd.h>\n#include <stddef.h>'))
 else