summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorGonglei2014-07-01 14:58:08 +0200
committerPeter Maydell2014-07-01 18:42:23 +0200
commit015a33bd05b7fd69f400d4e0e4a9925af9292548 (patch)
treea1ac8883dc8ccff13eb6e129880f0aab7e2d87a6 /configure
parentMerge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20140701-1' into s... (diff)
downloadqemu-015a33bd05b7fd69f400d4e0e4a9925af9292548.tar.gz
qemu-015a33bd05b7fd69f400d4e0e4a9925af9292548.tar.xz
qemu-015a33bd05b7fd69f400d4e0e4a9925af9292548.zip
net: add mmsghdr struct check for L2TPV3
The mmsghdr struct is only introduced in Linux 2.6.32; add a configure check for it and disable L2TPV3 on hosts which are too old to provide it, rather than simply failing to compile. Reported-by: chenliang <chenliang88@huawei.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1404219488-11196-1-git-send-email-arei.gonglei@huawei.com [PMM: cleaned up commit message and corrected kernel version number] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure b/configure
index ed41eda4d3..7dd43fdc70 100755
--- a/configure
+++ b/configure
@@ -1712,6 +1712,19 @@ else
fi
##########################################
+# L2TPV3 probe
+
+cat > $TMPC <<EOF
+#include <sys/socket.h>
+int main(void) { return sizeof(struct mmsghdr); }
+EOF
+if compile_prog "" "" ; then
+ l2tpv3=yes
+else
+ l2tpv3=no
+fi
+
+##########################################
# pkg-config probe
if ! has "$pkg_config_exe"; then
@@ -4343,6 +4356,9 @@ fi
if test "$netmap" = "yes" ; then
echo "CONFIG_NETMAP=y" >> $config_host_mak
fi
+if test "$l2tpv3" = "yes" ; then
+ echo "CONFIG_L2TPV3=y" >> $config_host_mak
+fi
if test "$cap_ng" = "yes" ; then
echo "CONFIG_LIBCAP=y" >> $config_host_mak
fi