[llvm-commits] [PATCH][Support/Unix] Unconditionally include time.h

Michael Spencer bigcheesegs at gmail.com
Fri Apr 20 14:24:45 PDT 2012


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

- Michael Spencer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: time.h.patch
Type: application/octet-stream
Size: 471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120420/e26b87a9/attachment.obj>


More information about the llvm-commits mailing list