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>
This commit is contained in:
Gonglei 2014-07-01 20:58:08 +08:00 committed by Peter Maydell
parent 596742db33
commit 015a33bd05
3 changed files with 19 additions and 3 deletions

View file

@ -806,7 +806,7 @@ static int (* const net_client_init_fun[NET_CLIENT_OPTIONS_KIND_MAX])(
#ifdef CONFIG_VHOST_NET_USED
[NET_CLIENT_OPTIONS_KIND_VHOST_USER] = net_init_vhost_user,
#endif
#ifdef CONFIG_LINUX
#ifdef CONFIG_L2TPV3
[NET_CLIENT_OPTIONS_KIND_L2TPV3] = net_init_l2tpv3,
#endif
};
@ -845,7 +845,7 @@ static int net_client_init1(const void *object, int is_netdev, Error **errp)
#ifdef CONFIG_VHOST_NET_USED
case NET_CLIENT_OPTIONS_KIND_VHOST_USER:
#endif
#ifdef CONFIG_LINUX
#ifdef CONFIG_L2TPV3
case NET_CLIENT_OPTIONS_KIND_L2TPV3:
#endif
break;