summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorbrobecke <brobecke@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-08 17:14:26 +0000
committerbrobecke <brobecke@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-08 17:14:26 +0000
commit9fb32edc17bc01be888aa0b4132777f00bbf166b (patch)
tree344ec8553dc136eb5e20b5138e48d895ba582733 /libiberty
parent2550b6a866c887472b587bef87d433c51cf1ebc8 (diff)
downloadgcc-9fb32edc17bc01be888aa0b4132777f00bbf166b.tar.gz
libiberty/mkstemps.c: Include <time.h> if <sys/time.h> not available.
libiberty/ChangeLog: * mkstemps.c: #include <time.h> if HAVE_TIME_H is defined but not HAVE_SYS_TIME_H. (fixes a build failure on LynxOS-178) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222918 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/mkstemps.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 651f8a9a5f0..30da962795a 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-08 Joel Brobecker <brobecker@adacore.com>
+
+ * mkstemps.c: #include <time.h> if HAVE_TIME_H is defined
+ but not HAVE_SYS_TIME_H.
+
2015-04-22 Eli Zaretskii <eliz@gnu.org>
* setenv.c <environ>: Declare only if not a macro.
diff --git a/libiberty/mkstemps.c b/libiberty/mkstemps.c
index a0e68a73b49..0e06fe17059 100644
--- a/libiberty/mkstemps.c
+++ b/libiberty/mkstemps.c
@@ -35,6 +35,8 @@
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
+#elif HAVE_TIME_H
+#include <time.h>
#endif
#include "ansidecl.h"