Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1580783

Re: [PATCH] uapi: fix linux/if_pppol2tp.h userspace compilation errors

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] uapi: fix linux/if_pppol2tp.h userspace compilation errors
Date 2017-02-14 20:40 +0100
Message-ID <taR7c-5Vy-27@gated-at.bofh.it> (permalink)
References <taIQh-L8-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Tue, 14 Feb 2017 13:33:53 +0300

> 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'

This is protected properly by __UAPI_DEF_IN_ADDR, so whichever gets
included first makes the definition.

This whole thing is designed so that if GLIBC headers are included
first, __UAPI_DEF_IN_ADDR will be defined to zero, therefore
linux/in.h won't try to make the definition.  Otherwise it will.

The facility should not be so fragile that we have to play all
kinds of header ordering games.  We would be imposing the same
strange rules on userspace applications including these headers
which is completely unacceptable.

So if the facility isn't working correctly, let's fix that instead
of fidgeting with include ordering all over the tree.

Thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] uapi: fix linux/if_pppol2tp.h userspace compilation errors "Dmitry V. Levin" <ldv@altlinux.org> - 2017-02-14 11:50 +0100
  Re: [PATCH] uapi: fix linux/if_pppol2tp.h userspace compilation  errors David Miller <davem@davemloft.net> - 2017-02-14 20:40 +0100
    Re: [PATCH] uapi: fix linux/if_pppol2tp.h userspace compilation errors "Dmitry V. Levin" <ldv@altlinux.org> - 2017-02-14 21:40 +0100
      [PATCH v2] uapi: fix linux/if_pppol2tp.h userspace compilation errors "Dmitry V. Levin" <ldv@altlinux.org> - 2017-02-15 03:30 +0100
        Re: [PATCH v2] uapi: fix linux/if_pppol2tp.h userspace compilation  errors David Miller <davem@davemloft.net> - 2017-02-15 04:20 +0100

csiph-web