From 575b22b1b7a843f34f52ebc9c00fb1c967258912 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 2 Jun 2016 22:14:15 +0200 Subject: linux-user: check if NETLINK_ROUTE is available Some IFLA_* symbols can be missing in the host linux/if_link.h, but as they are enums and not "#defines", check in "configure" if last known (IFLA_PROTO_DOWN) is available and if not, disable management of NETLINK_ROUTE protocol. Signed-off-by: Laurent Vivier Signed-off-by: Riku Voipio --- configure | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 6d01d96..d1dbc4b 100755 --- a/configure +++ b/configure @@ -4526,6 +4526,17 @@ if compile_prog "" "" ; then have_fsxattr=yes fi +have_rtnetlink=no +cat > $TMPC << EOF +#include +int main(void) { + return IFLA_PROTO_DOWN; +} +EOF +if compile_prog "" "" ; then + have_rtnetlink=yes +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -5461,6 +5472,10 @@ if test "$rdma" = "yes" ; then echo "CONFIG_RDMA=y" >> $config_host_mak fi +if test "$have_rtnetlink" = "yes" ; then + echo "CONFIG_RTNETLINK=y" >> $config_host_mak +fi + # Hold two types of flag: # CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on # a thread we have a handle to -- cgit v1.1 From 227f02143f269493543faf6908318c17abd725cd Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 6 Jun 2016 19:58:11 +0100 Subject: linux-user: Use safe_syscall wrapper for epoll_wait syscalls Use the safe_syscall wrapper for epoll_wait and epoll_pwait syscalls. Since we now directly use the host epoll_pwait syscall for both epoll_wait and epoll_pwait, we don't need the configure machinery to check whether glibc supports epoll_pwait(). (The kernel has supported the syscall since 2.6.19 so we can assume it's always there.) Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- configure | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'configure') diff --git a/configure b/configure index d1dbc4b..e995ddd 100755 --- a/configure +++ b/configure @@ -3798,8 +3798,8 @@ if compile_prog "" "" ; then epoll=yes fi -# epoll_create1 and epoll_pwait are later additions -# so we must check separately for their presence +# epoll_create1 is a later addition +# so we must check separately for its presence epoll_create1=no cat > $TMPC << EOF #include @@ -3821,20 +3821,6 @@ if compile_prog "" "" ; then epoll_create1=yes fi -epoll_pwait=no -cat > $TMPC << EOF -#include - -int main(void) -{ - epoll_pwait(0, 0, 0, 0, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - epoll_pwait=yes -fi - # check for sendfile support sendfile=no cat > $TMPC << EOF @@ -5125,9 +5111,6 @@ fi if test "$epoll_create1" = "yes" ; then echo "CONFIG_EPOLL_CREATE1=y" >> $config_host_mak fi -if test "$epoll_pwait" = "yes" ; then - echo "CONFIG_EPOLL_PWAIT=y" >> $config_host_mak -fi if test "$sendfile" = "yes" ; then echo "CONFIG_SENDFILE=y" >> $config_host_mak fi -- cgit v1.1