diff mbox series

linux-user: fix strace build w/out munlockall

Message ID 20230117233042.16897-1-vapier@gentoo.org (mailing list archive)
State New, archived
Headers show
Series linux-user: fix strace build w/out munlockall | expand

Commit Message

Mike Frysinger Jan. 17, 2023, 11:30 p.m. UTC
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 linux-user/strace.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Philippe Mathieu-Daudé Jan. 18, 2023, 7:21 a.m. UTC | #1
On 18/1/23 00:30, Mike Frysinger wrote:
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>   linux-user/strace.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index 9ae5a812cd71..f7912ad67f2b 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -1380,6 +1380,7 @@ UNUSED static struct flags termios_lflags[] = {
>       FLAG_END,
>   };
>   
> +#ifdef TARGET_NR_mlockall
>   UNUSED static struct flags mlockall_flags[] = {

Removing the 'UNUSED' qualifier:

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>       FLAG_TARGET(MCL_CURRENT),
>       FLAG_TARGET(MCL_FUTURE),
> @@ -1388,6 +1389,7 @@ UNUSED static struct flags mlockall_flags[] = {
>   #endif
>       FLAG_END,
>   };
> +#endif
>   
>   /* IDs of the various system clocks */
>   #define TARGET_CLOCK_REALTIME              0
diff mbox series

Patch

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 9ae5a812cd71..f7912ad67f2b 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1380,6 +1380,7 @@  UNUSED static struct flags termios_lflags[] = {
     FLAG_END,
 };
 
+#ifdef TARGET_NR_mlockall
 UNUSED static struct flags mlockall_flags[] = {
     FLAG_TARGET(MCL_CURRENT),
     FLAG_TARGET(MCL_FUTURE),
@@ -1388,6 +1389,7 @@  UNUSED static struct flags mlockall_flags[] = {
 #endif
     FLAG_END,
 };
+#endif
 
 /* IDs of the various system clocks */
 #define TARGET_CLOCK_REALTIME              0