[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:
Petr Hosek
2023-06-20 21:49:22 +00:00
parent aae155c50b
commit 037952f6d4

View File

@@ -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>