Work around compilation failure with old Apple SDKs

When building fish-shell with the macOS 10.12 SDK, <sys/proc.h> does not
include <sys/time.h> but references `struct itimerval`. This causes a
compilation failure if we don't import <sys/time.h> ourselves.

This was previously masked by an import of <sys/sysctl.h>, which was
removed in fc0c39b6fd.
This commit is contained in:
Lily Ballard 2020-02-13 21:14:27 -08:00 committed by Fabian Homborg
parent 399a71645e
commit 47aeaa1535

View File

@ -17,6 +17,7 @@
#include <procfs.h>
#endif
#if __APPLE__
#include <sys/time.h> // Required to build with old SDK versions
#include <sys/proc.h>
#else
#include <dirent.h>