diff mbox series

linux-user: Fix build failure caused by missing __u64 on musl

Message ID 20241022122929.17465-2-ziyao@disroot.org (mailing list archive)
State New
Headers show
Series linux-user: Fix build failure caused by missing __u64 on musl | expand

Commit Message

Yao Zi Oct. 22, 2024, 12:29 p.m. UTC
Commit 9651cead2f ("linux-user: add openat2 support in linux-user")
ships a definition of struct open_how_ver0 while assuming type __u64 is
available in code, which is not the case when building QEMU on musl.
Let's replaces __u64 with uint64_t.

Fixes: 9651cead2f ("linux-user: add openat2 support in linux-user")
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
 linux-user/syscall_defs.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Laurent Vivier Oct. 22, 2024, 1:47 p.m. UTC | #1
Le 22/10/2024 à 14:29, Yao Zi a écrit :
> Commit 9651cead2f ("linux-user: add openat2 support in linux-user")
> ships a definition of struct open_how_ver0 while assuming type __u64 is
> available in code, which is not the case when building QEMU on musl.
> Let's replaces __u64 with uint64_t.
> 
> Fixes: 9651cead2f ("linux-user: add openat2 support in linux-user")
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
>   linux-user/syscall_defs.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 0ade83745e..0e08dfae3e 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -2750,9 +2750,9 @@ struct target_sched_param {
>   
>   /* from kernel's include/uapi/linux/openat2.h */
>   struct open_how_ver0 {
> -    __u64 flags;
> -    __u64 mode;
> -    __u64 resolve;
> +    uint64_t flags;
> +    uint64_t mode;
> +    uint64_t resolve;
>   };
>   struct target_open_how_ver0 {
>       abi_ullong flags;

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Richard Henderson Oct. 22, 2024, 6:21 p.m. UTC | #2
On 10/22/24 05:29, Yao Zi wrote:
> Commit 9651cead2f ("linux-user: add openat2 support in linux-user")
> ships a definition of struct open_how_ver0 while assuming type __u64 is
> available in code, which is not the case when building QEMU on musl.
> Let's replaces __u64 with uint64_t.
> 
> Fixes: 9651cead2f ("linux-user: add openat2 support in linux-user")
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
>   linux-user/syscall_defs.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 0ade83745e..0e08dfae3e 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -2750,9 +2750,9 @@ struct target_sched_param {
>   
>   /* from kernel's include/uapi/linux/openat2.h */
>   struct open_how_ver0 {
> -    __u64 flags;
> -    __u64 mode;
> -    __u64 resolve;
> +    uint64_t flags;
> +    uint64_t mode;
> +    uint64_t resolve;
>   };
>   struct target_open_how_ver0 {
>       abi_ullong flags;

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

Queued, thanks.

r~
diff mbox series

Patch

diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 0ade83745e..0e08dfae3e 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2750,9 +2750,9 @@  struct target_sched_param {
 
 /* from kernel's include/uapi/linux/openat2.h */
 struct open_how_ver0 {
-    __u64 flags;
-    __u64 mode;
-    __u64 resolve;
+    uint64_t flags;
+    uint64_t mode;
+    uint64_t resolve;
 };
 struct target_open_how_ver0 {
     abi_ullong flags;