aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2015-05-08 17:14:26 +0000
committerJoel Brobecker <brobecker@adacore.com>2015-05-08 17:14:26 +0000
commit12c91750ad19833a3bd67e2a17a48e381adf8f52 (patch)
tree344ec8553dc136eb5e20b5138e48d895ba582733 /libiberty
parentf3b1150c4f3da9a2ec9958f07f266493979e18d1 (diff)
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: https://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"