meson: Fix argp detection, prevent Werror=return-type
authorFerdinand Thiessen <rpm@fthiessen.de>
Mon, 26 Apr 2021 22:28:09 +0000 (00:28 +0200)
committerFerdinand Thiessen <rpm@fthiessen.de>
Mon, 26 Apr 2021 22:28:09 +0000 (00:28 +0200)
meson.build

index 72f8c57293f6cd8963e4a0ac739a9678dc78ead9..5fa738647aad5242ecb319f19fea1b65c0f59e72 100644 (file)
@@ -28,7 +28,7 @@ endif
 
 curl_dep = dependency('libcurl')
 
-if build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); }; void main() {}')
+if build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}')
     argplib = cc.find_library('argp')
 else
     argplib = dependency('', required : false)