[PATCH] time: Define _STRUCT_TIMESPEC in <bits/types/struct_timespec.h>
Florian Weimer
fweimer@redhat.com
Thu Jun 21 11:24:00 GMT 2018
On 06/21/2018 01:00 PM, Zack Weinberg wrote:
> On Thu, Jun 21, 2018 at 2:46 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> After commit d76d3703551a362b472c866b5b6089f66f8daa8e ("Fix missing
>> timespec definition for sys/stat.h (BZ #21371)"), sanitizer builds start
>> to fail due to a conflicting definition of struct timespec in
>> <linux/time.h>. Define _STRUCT_TIMESPEC, which is already checked in
>> the kernel header, to support including <linux/time.h> after
>> <sys/stat.h>.
>
> Should it go the other way around as well? That is, if
> _STRUCT_TIMESPEC is already defined, should we suppress our
> definition?
Hmm, sure, that would be possible.
> Either way I think there should be a comment saying that linux/time.h
> checks this macro.
It's in generic code, so I wasn't sure if it was okay to refer to
<linux/time.h>. But I can certainly add that.
What about the attached patch?
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timespec.patch
Type: text/x-patch
Size: 1052 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20180621/87cb6ee7/attachment.bin>
More information about the Libc-alpha
mailing list