1
0
mirror of https://github.com/google/benchmark.git synced 2025-03-27 04:27:12 +08:00

Only include "sys/sysctl.h" if it is needed.

sys/sysctl.h is not available in the android-ndk.
This commit is contained in:
Anton Danielsson 2015-10-05 10:24:12 +02:00
parent c1e03a4b58
commit 0d35f5f68a

View File

@ -23,9 +23,11 @@
#include <fcntl.h>
#include <sys/resource.h>
#include <sys/types.h> // this header must be included before 'sys/sysctl.h' to avoid compilation error on FreeBSD
#include <sys/sysctl.h>
#include <sys/time.h>
#include <unistd.h>
#if defined OS_FREEBSD || defined OS_MACOSX
#include <sys/sysctl.h>
#endif
#endif
#include <cerrno>