]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
uapi: fix linux/if_pppol2tp.h userspace compilation errors
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 15 Feb 2017 02:23:26 +0000 (05:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Feb 2017 03:18:05 +0000 (22:18 -0500)
commita725eb15db80643a160310ed6bcfd6c5a6c907f2
treec35157457e31b45e4867708a38b6290569fea237
parentd199fab63c11998a602205f7ee7ff7c05c97164b
uapi: fix linux/if_pppol2tp.h userspace compilation errors

Because of <linux/libc-compat.h> interface limitations, <netinet/in.h>
provided by libc cannot be included after <linux/in.h>, therefore any
header that includes <netinet/in.h> cannot be included after <linux/in.h>.

Change uapi/linux/l2tp.h, the last uapi header that includes
<netinet/in.h>, to include <linux/in.h> and <linux/in6.h> instead of
<netinet/in.h> and use __SOCK_SIZE__ instead of sizeof(struct sockaddr)
the same way as uapi/linux/in.h does, to fix linux/if_pppol2tp.h userspace
compilation errors like this:

In file included from /usr/include/linux/l2tp.h:12:0,
                 from /usr/include/linux/if_pppol2tp.h:21,
/usr/include/netinet/in.h:31:8: error: redefinition of 'struct in_addr'

Fixes: 47c3e7783be4 ("net: l2tp: deprecate PPPOL2TP_MSG_* in favour of L2TP_MSG_*")
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/l2tp.h