diff mbox

[PULL,02/11] linux-user/alpha: Add define for NR_shmat to enable shmat syscall

Message ID ea2b5fb19d50c1cbdea9a40504e31e54d37b8bab.1422392096.git.riku.voipio@linaro.org
State Accepted
Commit ea2b5fb19d50c1cbdea9a40504e31e54d37b8bab
Headers show

Commit Message

Riku Voipio Jan. 27, 2015, 9:07 p.m. UTC
From: Peter Maydell <peter.maydell@linaro.org>

For historical reasons, the define for the shmat() syscall on Alpha is
NR_osf_shmat; however it has the same semantics as this syscall does
on all other architectures, so define TARGET_NR_shmat as well so that
QEMU's code for the syscall is enabled.

This patch brings our behaviour on the LTP shmat tests into line
with that for ARM (still not a perfect pass rate but not "this syscall
is completely broken" as we had before).

(Problem detected via a clang warning that the do_shmat() function
was unused on Alpha.)

Cc: Richard Henderson <rth@twiddle.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 linux-user/alpha/syscall_nr.h | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h
index 625f301..dde8d5c 100644
--- a/linux-user/alpha/syscall_nr.h
+++ b/linux-user/alpha/syscall_nr.h
@@ -185,6 +185,10 @@ 
 #define TARGET_NR_osf_utsname	207
 #define TARGET_NR_lchown		208
 #define TARGET_NR_osf_shmat		209
+/* this has the usual shmat semantics so give it the name syscall.c expects
+ * so that our support for it is enabled.
+ */
+#define TARGET_NR_shmat TARGET_NR_osf_shmat
 #define TARGET_NR_shmctl		210
 #define TARGET_NR_shmdt		211
 #define TARGET_NR_shmget		212