[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/16] meson: fix migration/stress compilation with glib>=2.30
From: |
marcandre . lureau |
Subject: |
[PATCH 15/16] meson: fix migration/stress compilation with glib>=2.30 |
Date: |
Fri, 28 Aug 2020 15:07:33 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
gettid() was introduced with glibc 2.30.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
meson.build | 3 +++
tests/migration/stress.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/meson.build b/meson.build
index 421f53083e..a8e074f4fa 100644
--- a/meson.build
+++ b/meson.build
@@ -408,6 +408,8 @@ if 'CONFIG_TASN1' in config_host
endif
keyutils = dependency('keyutils', required: false)
+has_gettid = cc.has_function('gettid')
+
# Create config-host.h
config_host_data.set('CONFIG_SDL', sdl.found())
@@ -418,6 +420,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)
{
--
2.26.2
- Re: [PATCH 05/16] tests: qga has virtio-serial by default when host has it, (continued)
- [PATCH 06/16] meson: convert the unit tests, marcandre . lureau, 2020/08/28
- [PATCH 07/16] meson: move keyutils dependency check, marcandre . lureau, 2020/08/28
- [PATCH 08/16] meson: remove old socket_scm_helper rule, marcandre . lureau, 2020/08/28
- [PATCH 09/16] meson: convert vhost-user-bridge, marcandre . lureau, 2020/08/28
- [PATCH 10/16] meson: convert atomic*-bench, marcandre . lureau, 2020/08/28
- [PATCH 11/16] tests/Makefile.include: update check-build, marcandre . lureau, 2020/08/28
- [PATCH 12/16] tests: do not print benchmark output to stdout, marcandre . lureau, 2020/08/28
- [PATCH 13/16] meson: convert the speed tests, marcandre . lureau, 2020/08/28
- [PATCH 14/16] tests/migration/stress: remove unused exit_success, marcandre . lureau, 2020/08/28
- [PATCH 15/16] meson: fix migration/stress compilation with glib>=2.30,
marcandre . lureau <=
- [PATCH 16/16] meson: convert migration/initrd-stress, marcandre . lureau, 2020/08/28
- Re: [PATCH 00/16] meson: convert unit tests in tests/Makefile.include, Thomas Huth, 2020/08/28