Y2038: Include proper header to provide support for struct timeval on HURD
diff mbox series

Message ID 20191002154949.22664-1-lukma@denx.de
State New
Headers show
Series
  • Y2038: Include proper header to provide support for struct timeval on HURD
Related show

Commit Message

Lukasz Majewski Oct. 2, 2019, 3:49 p.m. UTC
The HURD requires explicit inclusion of <bits/types/struct_timeval.h> to use
struct timeval in ./include/time.h.
For this particular glibc port, the proper header hasn't been included before
inclusion of time.h.

Tested with build-many-glibcs.py with i686-gnu and x86_64-linux-gnu:

build-many-glibcs.py /home/lukma/work/glibc/glibc-many-build --keep all compilers i686-gnu
build-many-glibcs.py /home/lukma/work/glibc/glibc-many-build --keep all glibcs i686-gnu

Also run of xcheck on x86_64:
./src/configure --prefix=/usr
make PARALLELMFLAGS="-j12" && make xcheck PARALLELMFLAGS="-j12"

	* include/time.h: Add #include <bits/types/struct_timeval.h>
---
 include/time.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Joseph Myers Oct. 2, 2019, 3:58 p.m. UTC | #1
On Wed, 2 Oct 2019, Lukasz Majewski wrote:

> The HURD requires explicit inclusion of <bits/types/struct_timeval.h> to use
> struct timeval in ./include/time.h.
> For this particular glibc port, the proper header hasn't been included before
> inclusion of time.h.
> 
> Tested with build-many-glibcs.py with i686-gnu and x86_64-linux-gnu:
> 
> build-many-glibcs.py /home/lukma/work/glibc/glibc-many-build --keep all compilers i686-gnu
> build-many-glibcs.py /home/lukma/work/glibc/glibc-many-build --keep all glibcs i686-gnu
> 
> Also run of xcheck on x86_64:
> ./src/configure --prefix=/usr
> make PARALLELMFLAGS="-j12" && make xcheck PARALLELMFLAGS="-j12"
> 
> 	* include/time.h: Add #include <bits/types/struct_timeval.h>

OK, please commit.

Patch
diff mbox series

diff --git a/include/time.h b/include/time.h
index 9878c2b2ca..f6dc731ac6 100644
--- a/include/time.h
+++ b/include/time.h
@@ -2,6 +2,7 @@ 
 #include <time/time.h>
 
 #ifndef _ISOMAC
+# include <bits/types/struct_timeval.h>
 # include <bits/types/locale_t.h>
 # include <stdbool.h>
 # include <time/mktime-internal.h>