Message ID | 20230118090144.31155-1-vapier@gentoo.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] linux-user: fix strace build w/out munlockall | expand |
Le 18/01/2023 à 10:01, Mike Frysinger a écrit : > Signed-off-by: Mike Frysinger <vapier@gentoo.org> > Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > linux-user/strace.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/linux-user/strace.c b/linux-user/strace.c > index 9ae5a812cd71..11a7c3df9498 100644 > --- a/linux-user/strace.c > +++ b/linux-user/strace.c > @@ -1380,7 +1380,8 @@ UNUSED static struct flags termios_lflags[] = { > FLAG_END, > }; > > -UNUSED static struct flags mlockall_flags[] = { > +#ifdef TARGET_NR_mlockall > +static struct flags mlockall_flags[] = { > FLAG_TARGET(MCL_CURRENT), > FLAG_TARGET(MCL_FUTURE), > #ifdef MCL_ONFAULT > @@ -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 Applied to my linux-user-for-8.0 branch. Thanks, Laurent
diff --git a/linux-user/strace.c b/linux-user/strace.c index 9ae5a812cd71..11a7c3df9498 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1380,7 +1380,8 @@ UNUSED static struct flags termios_lflags[] = { FLAG_END, }; -UNUSED static struct flags mlockall_flags[] = { +#ifdef TARGET_NR_mlockall +static struct flags mlockall_flags[] = { FLAG_TARGET(MCL_CURRENT), FLAG_TARGET(MCL_FUTURE), #ifdef MCL_ONFAULT @@ -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