mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
[libcxx] Include <sys/time.h> in posix_compat.h
posix_compat.h uses struct timeval which is defined in <sys/time.h> but it doesn't include it. On most POSIX platforms like Linux or macOS, that headers is transitively included by other headers like <sys/stat.h>, but there are other platforms where this is not the case. Differential Revision: https://reviews.llvm.org/D153384
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
# include <unistd.h>
|
||||
# include <sys/stat.h>
|
||||
# include <sys/statvfs.h>
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
Reference in New Issue
Block a user