diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-04-23 19:00:27 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-04-23 19:00:27 +0000 |
commit | 04b795bc1d1381c75421647c9385043c10d13d30 (patch) | |
tree | 1537594db321f5db3e4a454fbca2e274255f7e7d /llvm/lib/Support/Unix | |
parent | 3cc207bbccbaedfdb94eb2532624fc065d675d99 (diff) | |
download | bcm5719-llvm-04b795bc1d1381c75421647c9385043c10d13d30.tar.gz bcm5719-llvm-04b795bc1d1381c75421647c9385043c10d13d30.zip |
[Support/Unix] Unconditionally include time.h.
When building LLVM on Linux with libc++ with CMake TIME_WITH_SYS_TIME is
undefined, and HAVE_SYS_TIME_H is defined. This ends up including
sys/time.h but not time.h. Unix/TimeValue.inc requires time.h for asctime_r
and localtime. libstdc++ seems to include time.h anyway, but libc++ does
not.
Fix this by always including time.h
llvm-svn: 155382
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r-- | llvm/lib/Support/Unix/Unix.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Support/Unix/Unix.h b/llvm/lib/Support/Unix/Unix.h index b7be3111d43..361f297d364 100644 --- a/llvm/lib/Support/Unix/Unix.h +++ b/llvm/lib/Support/Unix/Unix.h @@ -44,16 +44,10 @@ #include <assert.h> #endif -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include <sys/time.h> -# include <time.h> -#else -# ifdef HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif #endif +#include <time.h> #ifdef HAVE_SYS_WAIT_H # include <sys/wait.h> |