* linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3
@ 2016-10-15 12:05 Pascal Terjan
2016-10-15 14:09 ` Mikko Rapeli
0 siblings, 1 reply; 5+ messages in thread
From: Pascal Terjan @ 2016-10-15 12:05 UTC (permalink / raw)
To: Mikko Rapeli, David S. Miller; +Cc: netdev
It is no longer possible to include <linux/atm_zatm.h> + userspace
headers using time, for example <stdlib.h>, this broke for example
the build of linux-atm.
Reproducer:
$ cat test.c
#include <linux/atm_zatm.h>
#include <stdlib.h>
$ gcc -c test.c
In file included from /usr/include/sys/select.h:43:0,
from /usr/include/sys/types.h:219,
from /usr/include/stdlib.h:314,
from test.c:2:
/usr/include/time.h:120:8: error: redefinition of 'struct timespec'
struct timespec
^
In file included from /usr/include/linux/atm_zatm.h:17:0,
from test.c:1:
/usr/include/linux/time.h:9:8: note: originally defined here
struct timespec {
^
In file included from /usr/include/sys/select.h:45:0,
from /usr/include/sys/types.h:219,
from /usr/include/stdlib.h:314,
from test.c:2:
/usr/include/bits/time.h:30:8: error: redefinition of 'struct timeval'
struct timeval
^
In file included from /usr/include/linux/atm_zatm.h:17:0,
from test.c:1:
/usr/include/linux/time.h:15:8: note: originally defined here
struct timeval {
^
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3
2016-10-15 12:05 linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3 Pascal Terjan
@ 2016-10-15 14:09 ` Mikko Rapeli
2016-10-15 14:33 ` Pascal Terjan
0 siblings, 1 reply; 5+ messages in thread
From: Mikko Rapeli @ 2016-10-15 14:09 UTC (permalink / raw)
To: Pascal Terjan; +Cc: David S. Miller, netdev
On Sat, Oct 15, 2016 at 01:05:10PM +0100, Pascal Terjan wrote:
> It is no longer possible to include <linux/atm_zatm.h> + userspace
> headers using time, for example <stdlib.h>, this broke for example
> the build of linux-atm.
>
> Reproducer:
>
> $ cat test.c
> #include <linux/atm_zatm.h>
> #include <stdlib.h>
If possible, please reverse the order of includes to first include glibc
headers and then Linux kernel uapi ones.
Kernel uapi headers did not declare their header file dependencies correctly
and I've been fixing them. I have also tried to fix compatibility issues
with glibc headers, but unfortunately they only work when glibc headers
are included before kernel headers. Userspace which has been relying on
the magic include order for various uapi headers is now unfortunately
affected. Sorry about that.
-Mikko
> $ gcc -c test.c
> In file included from /usr/include/sys/select.h:43:0,
> from /usr/include/sys/types.h:219,
> from /usr/include/stdlib.h:314,
> from test.c:2:
> /usr/include/time.h:120:8: error: redefinition of 'struct timespec'
> struct timespec
> ^
> In file included from /usr/include/linux/atm_zatm.h:17:0,
> from test.c:1:
> /usr/include/linux/time.h:9:8: note: originally defined here
> struct timespec {
> ^
> In file included from /usr/include/sys/select.h:45:0,
> from /usr/include/sys/types.h:219,
> from /usr/include/stdlib.h:314,
> from test.c:2:
> /usr/include/bits/time.h:30:8: error: redefinition of 'struct timeval'
> struct timeval
> ^
> In file included from /usr/include/linux/atm_zatm.h:17:0,
> from test.c:1:
> /usr/include/linux/time.h:15:8: note: originally defined here
> struct timeval {
> ^
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3
2016-10-15 14:09 ` Mikko Rapeli
@ 2016-10-15 14:33 ` Pascal Terjan
2016-10-15 15:10 ` Mikko Rapeli
0 siblings, 1 reply; 5+ messages in thread
From: Pascal Terjan @ 2016-10-15 14:33 UTC (permalink / raw)
To: Mikko Rapeli; +Cc: David S. Miller, netdev
On 15 October 2016 at 15:09, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> On Sat, Oct 15, 2016 at 01:05:10PM +0100, Pascal Terjan wrote:
>> It is no longer possible to include <linux/atm_zatm.h> + userspace
>> headers using time, for example <stdlib.h>, this broke for example
>> the build of linux-atm.
>>
>> Reproducer:
>>
>> $ cat test.c
>> #include <linux/atm_zatm.h>
>> #include <stdlib.h>
>
> If possible, please reverse the order of includes to first include glibc
> headers and then Linux kernel uapi ones.
That was what I tried first but this didn't help:
In file included from /usr/include/linux/atm_zatm.h:17:0,
from test.c:2:
/usr/include/linux/time.h:9:8: error: redefinition of 'struct timespec'
struct timespec {
^
In file included from /usr/include/sys/select.h:43:0,
from /usr/include/sys/types.h:219,
from /usr/include/stdlib.h:314,
from test.c:1:
/usr/include/time.h:120:8: note: originally defined here
struct timespec
^
In file included from /usr/include/linux/atm_zatm.h:17:0,
from test.c:2:
/usr/include/linux/time.h:15:8: error: redefinition of 'struct timeval'
struct timeval {
^
In file included from /usr/include/sys/select.h:45:0,
from /usr/include/sys/types.h:219,
from /usr/include/stdlib.h:314,
from test.c:1:
/usr/include/bits/time.h:30:8: note: originally defined here
struct timeval
^
> Kernel uapi headers did not declare their header file dependencies correctly
> and I've been fixing them. I have also tried to fix compatibility issues
> with glibc headers, but unfortunately they only work when glibc headers
> are included before kernel headers. Userspace which has been relying on
> the magic include order for various uapi headers is now unfortunately
> affected. Sorry about that.
In this case no order works, it seems the kernel doesn't handle it in
time.h unlike many other headers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3
2016-10-15 14:33 ` Pascal Terjan
@ 2016-10-15 15:10 ` Mikko Rapeli
2016-10-15 15:14 ` Pascal Terjan
0 siblings, 1 reply; 5+ messages in thread
From: Mikko Rapeli @ 2016-10-15 15:10 UTC (permalink / raw)
To: Pascal Terjan; +Cc: David S. Miller, netdev
On Sat, Oct 15, 2016 at 03:33:22PM +0100, Pascal Terjan wrote:
> On 15 October 2016 at 15:09, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> > On Sat, Oct 15, 2016 at 01:05:10PM +0100, Pascal Terjan wrote:
> >> It is no longer possible to include <linux/atm_zatm.h> + userspace
> >> headers using time, for example <stdlib.h>, this broke for example
> >> the build of linux-atm.
> >>
> >> Reproducer:
> >>
> >> $ cat test.c
> >> #include <linux/atm_zatm.h>
> >> #include <stdlib.h>
> >
> > If possible, please reverse the order of includes to first include glibc
> > headers and then Linux kernel uapi ones.
>
> That was what I tried first but this didn't help:
>
> In file included from /usr/include/linux/atm_zatm.h:17:0,
> from test.c:2:
> /usr/include/linux/time.h:9:8: error: redefinition of 'struct timespec'
> struct timespec {
> ^
> In file included from /usr/include/sys/select.h:43:0,
> from /usr/include/sys/types.h:219,
> from /usr/include/stdlib.h:314,
> from test.c:1:
> /usr/include/time.h:120:8: note: originally defined here
> struct timespec
> ^
> In file included from /usr/include/linux/atm_zatm.h:17:0,> from test.c:2:
> from test.c:2:
> /usr/include/linux/time.h:15:8: error: redefinition of 'struct timeval'
> struct timeval {
> ^
> In file included from /usr/include/sys/select.h:45:0,
> from /usr/include/sys/types.h:219,
> from /usr/include/stdlib.h:314,
> from test.c:1:
> /usr/include/bits/time.h:30:8: note: originally defined here
> struct timeval
> ^
> > Kernel uapi headers did not declare their header file dependencies correctly
> > and I've been fixing them. I have also tried to fix compatibility issues
> > with glibc headers, but unfortunately they only work when glibc headers
> > are included before kernel headers. Userspace which has been relying on
> > the magic include order for various uapi headers is now unfortunately
> > affected. Sorry about that.
>
> In this case no order works, it seems the kernel doesn't handle it in
> time.h unlike many other headers
Ok, then https://patchwork.kernel.org/patch/9294305/ hasn't been applied yet.
You can apply that or revert cf00713a655d3019be7faa184402f16c43a0fed3
for the time being.
It's a bit tricky to push through changes touching uapi headers for various
kernel sub systems since they may get applied at different order and time.
-Mikko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3
2016-10-15 15:10 ` Mikko Rapeli
@ 2016-10-15 15:14 ` Pascal Terjan
0 siblings, 0 replies; 5+ messages in thread
From: Pascal Terjan @ 2016-10-15 15:14 UTC (permalink / raw)
To: Mikko Rapeli; +Cc: David S. Miller, netdev
On 15 October 2016 at 16:10, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> On Sat, Oct 15, 2016 at 03:33:22PM +0100, Pascal Terjan wrote:
>> On 15 October 2016 at 15:09, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
>> > On Sat, Oct 15, 2016 at 01:05:10PM +0100, Pascal Terjan wrote:
>> >> It is no longer possible to include <linux/atm_zatm.h> + userspace
>> >> headers using time, for example <stdlib.h>, this broke for example
>> >> the build of linux-atm.
>> >>
>> >> Reproducer:
>> >>
>> >> $ cat test.c
>> >> #include <linux/atm_zatm.h>
>> >> #include <stdlib.h>
>> >
>> > If possible, please reverse the order of includes to first include glibc
>> > headers and then Linux kernel uapi ones.
>>
>> That was what I tried first but this didn't help:
>>
>> In file included from /usr/include/linux/atm_zatm.h:17:0,
>> from test.c:2:
>> /usr/include/linux/time.h:9:8: error: redefinition of 'struct timespec'
>> struct timespec {
>> ^
>> In file included from /usr/include/sys/select.h:43:0,
>> from /usr/include/sys/types.h:219,
>> from /usr/include/stdlib.h:314,
>> from test.c:1:
>> /usr/include/time.h:120:8: note: originally defined here
>> struct timespec
>> ^
>> In file included from /usr/include/linux/atm_zatm.h:17:0,> from test.c:2:
>> from test.c:2:
>> /usr/include/linux/time.h:15:8: error: redefinition of 'struct timeval'
>> struct timeval {
>> ^
>> In file included from /usr/include/sys/select.h:45:0,
>> from /usr/include/sys/types.h:219,
>> from /usr/include/stdlib.h:314,
>> from test.c:1:
>> /usr/include/bits/time.h:30:8: note: originally defined here
>> struct timeval
>> ^
>> > Kernel uapi headers did not declare their header file dependencies correctly
>> > and I've been fixing them. I have also tried to fix compatibility issues
>> > with glibc headers, but unfortunately they only work when glibc headers
>> > are included before kernel headers. Userspace which has been relying on
>> > the magic include order for various uapi headers is now unfortunately
>> > affected. Sorry about that.
>>
>> In this case no order works, it seems the kernel doesn't handle it in
>> time.h unlike many other headers
>
> Ok, then https://patchwork.kernel.org/patch/9294305/ hasn't been applied yet.
> You can apply that or revert cf00713a655d3019be7faa184402f16c43a0fed3
> for the time being.
Ah thanks, I'll take that patch :)
> It's a bit tricky to push through changes touching uapi headers for various
> kernel sub systems since they may get applied at different order and time.
Yeah I can imagine, thanks for doing it
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-15 15:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-15 12:05 linux/atm_zatm.h not really usable in userspace since cf00713a655d3019be7faa184402f16c43a0fed3 Pascal Terjan
2016-10-15 14:09 ` Mikko Rapeli
2016-10-15 14:33 ` Pascal Terjan
2016-10-15 15:10 ` Mikko Rapeli
2016-10-15 15:14 ` Pascal Terjan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox