diff mbox series

[Ada] Add sys/time.h #include for QNX

Message ID 20211005082649.GA2693711@adacore.com
State New
Headers show
Series [Ada] Add sys/time.h #include for QNX | expand

Commit Message

Pierre-Marie de Rodat Oct. 5, 2021, 8:26 a.m. UTC
As part of an improvement to the precision of
Ada.Directories.Modification_Time, we use the type `struct timespec`
when we can (if _POSIX_C_SOURCE is greater than 200809L). For QNX, we
need to include the system header `sys/time.h` to get the type
declaration, `time.h` does not have it.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* adaint.c (QNX): Add #include for sys/time.h.
diff mbox series

Patch

diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -98,6 +98,7 @@ 
 
 #ifdef __QNX__
 #include <sys/syspage.h>
+#include <sys/time.h>
 #endif
 
 #ifdef IN_RTS