aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorJoelle van Dyne <j@getutm.app>2021-01-25 17:24:51 -0800
committerPeter Maydell <peter.maydell@linaro.org>2021-01-29 10:47:28 +0000
commit1ad27f7d93f1a0f76b9cdad1bea01bcebfc130bc (patch)
treec3db458332d4f14d3b784de690b69f67044f7763 /meson.build
parent3812c0c4cbaf4b7b1be959ec6ca3303cdf92ca46 (diff)
osdep: build with non-working system() function
Build without error on hosts without a working system(). If system() is called, return -1 with ENOSYS. Signed-off-by: Joelle van Dyne <j@getutm.app> Message-id: 20210126012457.39046-6-j@getutm.app Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build1
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 27c31caa2d..9ecb09dfe2 100644
--- a/meson.build
+++ b/meson.build
@@ -1127,6 +1127,7 @@ config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h'))
config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h'))
config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h'))
+config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', prefix: '#include <stdlib.h>'))
config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#include <sys/uio.h>'))