[PATCH] qemu: remove use of gettid() syscall

Daniel P. Berrangé posted 1 patch 3 years, 8 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200807125344.3246310-1-berrange@redhat.com
src/qemu/qemu_shim.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] qemu: remove use of gettid() syscall
Posted by Daniel P. Berrangé 3 years, 8 months ago
This is not expose in most historical versions of glibc, nor
non-glibc impls. We must use our wrapper API instead.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---

Pushed as build fix

 src/qemu/qemu_shim.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_shim.c b/src/qemu/qemu_shim.c
index 4c06f15779..ef0ba086b5 100644
--- a/src/qemu/qemu_shim.c
+++ b/src/qemu/qemu_shim.c
@@ -176,8 +176,8 @@ int main(int argc, char **argv)
     }
 
     if (verbose)
-        g_printerr("%s: %lld: initializing libvirt %d\n",
-                   argv[0], deltams(), gettid());
+        g_printerr("%s: %lld: initializing libvirt %llu\n",
+                   argv[0], deltams(), virThreadSelfID());
 
     if (virInitialize() < 0) {
         g_printerr("%s: cannot initialize libvirt\n", argv[0]);
-- 
2.25.4