dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0002-linux-user-assume-__NR_gettid-always-exists.patch

Daniel P. Berrangé e24cbb
From 9abb23f799804ed7b30aecac2217f870b229f873 Mon Sep 17 00:00:00 2001
Daniel P. Berrangé e24cbb
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Daniel P. Berrangé e24cbb
Date: Wed, 20 Mar 2019 15:32:30 +0000
Daniel P. Berrangé e24cbb
Subject: [PATCH 1/2] linux-user: assume __NR_gettid always exists
Daniel P. Berrangé e24cbb
MIME-Version: 1.0
Daniel P. Berrangé e24cbb
Content-Type: text/plain; charset=UTF-8
Daniel P. Berrangé e24cbb
Content-Transfer-Encoding: 8bit
Daniel P. Berrangé e24cbb
Daniel P. Berrangé e24cbb
The gettid syscall was introduced in Linux 2.4.11. This is old enough
Daniel P. Berrangé e24cbb
that we can assume it always exists and thus not bother with the
Daniel P. Berrangé e24cbb
conditional backcompat logic.
Daniel P. Berrangé e24cbb
Daniel P. Berrangé e24cbb
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Daniel P. Berrangé e24cbb
---
Daniel P. Berrangé e24cbb
 linux-user/syscall.c | 8 --------
Daniel P. Berrangé e24cbb
 1 file changed, 8 deletions(-)
Daniel P. Berrangé e24cbb
Daniel P. Berrangé e24cbb
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
Daniel P. Berrangé e24cbb
index 208fd1813d..11729f382c 100644
Daniel P. Berrangé e24cbb
--- a/linux-user/syscall.c
Daniel P. Berrangé e24cbb
+++ b/linux-user/syscall.c
Daniel P. Berrangé e24cbb
@@ -249,15 +249,7 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,	\
Daniel P. Berrangé e24cbb
 #define TARGET_NR__llseek TARGET_NR_llseek
Daniel P. Berrangé e24cbb
 #endif
Daniel P. Berrangé e24cbb
 
Daniel P. Berrangé e24cbb
-#ifdef __NR_gettid
Daniel P. Berrangé e24cbb
 _syscall0(int, gettid)
Daniel P. Berrangé e24cbb
-#else
Daniel P. Berrangé e24cbb
-/* This is a replacement for the host gettid() and must return a host
Daniel P. Berrangé e24cbb
-   errno. */
Daniel P. Berrangé e24cbb
-static int gettid(void) {
Daniel P. Berrangé e24cbb
-    return -ENOSYS;
Daniel P. Berrangé e24cbb
-}
Daniel P. Berrangé e24cbb
-#endif
Daniel P. Berrangé e24cbb
 
Daniel P. Berrangé e24cbb
 /* For the 64-bit guest on 32-bit host case we must emulate
Daniel P. Berrangé e24cbb
  * getdents using getdents64, because otherwise the host
Daniel P. Berrangé e24cbb
-- 
Daniel P. Berrangé e24cbb
2.20.1
Daniel P. Berrangé e24cbb