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

Lukasz Majewski lukma@denx.de
Tue Oct 1 21:54:00 GMT 2019


Hi Joseph,

> Hi Joseph,
> 
> > This has broken the build of glibc for i686-gnu as struct timeval
> > isn't defined at this point in the build.  
> 
> I've been using glibc-many.py script and the diff between builds w/
> this patch was the same.
> 
> I had the UNRESOLVED: for i686-gnu glibc (with and without this patch)
> And this seems like the one for hurd...
> 
> As there are already patches applied on top of this one - I suppose
> that I shall provide incremental fix for it.
> 
> > 
> > In file included from
> > /scratch/jmyers/glibc-bot/install/compilers/i686-gnu/sysroot/include/hurd/hurd_types.h:24,
> > from ../hurd/hurd.h:30, from ../sysdeps/hurd/include/hurd.h:2,
> >                  from hurdid.c:18:
> > ../include/time.h:183:51: error: parameter 1 ('tv') has incomplete
> > type valid_timeval_to_timespec64 (const struct timeval tv)
> >                               ~~~~~~~~~~~~~~~~~~~~~^~
> > ../include/time.h:221:1: error: return type is an incomplete type
> >  valid_timespec64_to_timeval (const struct __timespec64 ts64)
> >  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > ../include/time.h: In function 'valid_timespec64_to_timeval':
> > ../include/time.h:223:18: error: storage size of 'tv' isn't known
> >    struct timeval tv;
> >                   ^~
> >   
> 
> I will submit fix ASAP.

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.

> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> lukma@denx.de


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20191001/8a0e37ab/attachment.sig>


More information about the Libc-alpha mailing list