[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 24/39] meson: fix migration/stress compilation with glibc>=2.30
From: |
Paolo Bonzini |
Subject: |
[PATCH 24/39] meson: fix migration/stress compilation with glibc>=2.30 |
Date: |
Wed, 2 Sep 2020 08:59:02 -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>
Message-Id: <20200828110734.1638685-16-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 3 +++
tests/migration/stress.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/meson.build b/meson.build
index 7c714bb49c..b71f561c96 100644
--- a/meson.build
+++ b/meson.build
@@ -413,6 +413,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())
@@ -423,6 +425,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
- [PATCH 14/39] meson: convert qht-bench, (continued)
- [PATCH 14/39] meson: convert qht-bench, Paolo Bonzini, 2020/09/02
- [PATCH 06/39] meson: remove b_lundef option, Paolo Bonzini, 2020/09/02
- [PATCH 11/39] meson: build qapi tests library, Paolo Bonzini, 2020/09/02
- [PATCH 08/39] configure: include cross sdl2-config in meson cross file, Paolo Bonzini, 2020/09/02
- [PATCH 05/39] mtest2make: unify tests that appear in multiple suites, Paolo Bonzini, 2020/09/02
- [PATCH 15/39] tests: qga has virtio-serial by default when host has it, Paolo Bonzini, 2020/09/02
- [PATCH 12/39] meson: declare tasn1 dependency, Paolo Bonzini, 2020/09/02
- [PATCH 10/39] meson: fix libqos linking, Paolo Bonzini, 2020/09/02
- [PATCH 21/39] tests: do not print benchmark output to stdout, Paolo Bonzini, 2020/09/02
- [PATCH 23/39] tests/migration/stress: remove unused exit_success, Paolo Bonzini, 2020/09/02
- [PATCH 24/39] meson: fix migration/stress compilation with glibc>=2.30,
Paolo Bonzini <=
- [PATCH 19/39] meson: convert vhost-user-bridge, Paolo Bonzini, 2020/09/02
- [PATCH 20/39] meson: convert atomic*-bench, Paolo Bonzini, 2020/09/02
- [PATCH 13/39] meson: declare keyutils dependency, Paolo Bonzini, 2020/09/02
- [PATCH 09/39] ninjatool: use constant names for stamp files, Paolo Bonzini, 2020/09/02
- [PATCH 18/39] meson: remove old socket_scm_helper rule, Paolo Bonzini, 2020/09/02
- [PATCH 17/39] meson: move keyutils dependency check, Paolo Bonzini, 2020/09/02
- [PATCH 04/39] mtest2make: hide output of successful tests, Paolo Bonzini, 2020/09/02
- [PATCH 29/39] Makefile: inline the relevant parts of rules.mak, Paolo Bonzini, 2020/09/02
- [PATCH 26/39] configure: remove dead code for in-tree builds, Paolo Bonzini, 2020/09/02
- [PATCH 31/39] configure: move C++ compiler handling to meson, Paolo Bonzini, 2020/09/02