aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build3
-rw-r--r--tests/migration/stress.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index f7cd2b6f73..3b73731bab 100644
--- a/meson.build
+++ b/meson.build
@@ -418,6 +418,8 @@ endif
keyutils = dependency('libkeyutils', required: false,
method: 'pkg-config', static: enable_static)
+has_gettid = cc.has_function('gettid')
+
# Create config-host.h
config_host_data.set('CONFIG_SDL', sdl.found())
@@ -428,6 +430,7 @@ config_host_data.set('CONFIG_VNC_PNG', png.found())
config_host_data.set('CONFIG_VNC_SASL', sasl.found())
config_host_data.set('CONFIG_XKBCOMMON', xkbcommon.found())
config_host_data.set('CONFIG_KEYUTILS', keyutils.found())
+config_host_data.set('CONFIG_GETTID', has_gettid)
config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version()))
config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0])
config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
diff --git a/tests/migration/stress.c b/tests/migration/stress.c
index 05d85051e3..0c72a420be 100644
--- a/tests/migration/stress.c
+++ b/tests/migration/stress.c
@@ -29,10 +29,12 @@ const char *argv0;
#define PAGE_SIZE 4096
+#ifndef CONFIG_GETTID
static int gettid(void)
{
return syscall(SYS_gettid);
}
+#endif
static __attribute__((noreturn)) void exit_failure(void)
{