diff --git a/osquery/core/init.cpp b/osquery/core/init.cpp index 9a622a82..e154e139 100644 --- a/osquery/core/init.cpp +++ b/osquery/core/init.cpp @@ -31,8 +31,11 @@ #include "osquery/core/watcher.h" #include "osquery/database/db_handle.h" -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) #include +#endif + +#ifdef __linux__ #include /* @@ -238,7 +241,7 @@ void Initializer::initDaemon() { #ifdef __linux__ // Using: ioprio_set(IOPRIO_WHO_PGRP, 0, IOPRIO_CLASS_IDLE); syscall(SYS_ioprio_set, IOPRIO_WHO_PGRP, 0, IOPRIO_CLASS_IDLE); -#elif defined(__APPLE__) || defined(__FreeBSD__) +#elif defined(__APPLE__) setiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_PROCESS, IOPOL_THROTTLE); #endif }