qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-riscv] [RFC v3 04/24] linux-user: riscv: Fix compile failure on ri


From: Alistair Francis
Subject: [Qemu-riscv] [RFC v3 04/24] linux-user: riscv: Fix compile failure on riscv32 hosts
Date: Sat, 8 Dec 2018 00:46:48 +0000

When cross compilling for riscv32 hosts using GCC 8.2 this error is seen:
    error: '__NR__llseek' undeclared (first use in this function); did you mean 
'_llseek'?

To avoid the error let's ensure that __NR__llseek is defined.

Signed-off-by: Alistair Francis <address@hidden>
---
 linux-user/riscv/target_syscall.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/linux-user/riscv/target_syscall.h 
b/linux-user/riscv/target_syscall.h
index ee81d8bc88..af73f71839 100644
--- a/linux-user/riscv/target_syscall.h
+++ b/linux-user/riscv/target_syscall.h
@@ -47,6 +47,11 @@ struct target_pt_regs {
 #endif
 #define UNAME_MINIMUM_RELEASE "4.15.0"
 
+/* This is sometimes needed to compile riscv32 Linux user mode */
+#if !defined(__NR__llseek) && !defined(__NR_lseek)
+#define __NR__llseek __NR3264_lseek
+#endif
+
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_MLOCKALL_MCL_CURRENT 1
 #define TARGET_MLOCKALL_MCL_FUTURE  2
-- 
2.19.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]