This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v10] y2038: Provide conversion helpers for struct __timespec64


On Tue, 1 Oct 2019, Lukasz Majewski wrote:

> It seems to me like it would be best to add the missing
> #include <sys/time.h> to HURD's #include <hurd/hurd_types.h> as it also
> includes for example struct timespec header. However, is is not so
> simple as this file is in hurd compiler includes 
> (glibc-many-build/install/compilers/i686-gnu/sysroot/include/hurd/hurd_types.h).
> 
> The other option would be to add #include <sys/time.h> just before
> struct __timespec64 conversion in ./include/time.h
> 
> I'm going to submit such patch for review.

How about including <bits/types/struct_timeval.h> in include/time.h 
(inside the !_ISOMAC conditional)?  It already includes 
<bits/types/locale_t.h>, for example; since it's using struct timeval, it 
seems natural for it to include the corresponding header (rather than a 
more general sys/time.h include).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]