diff --git a/os-posix.c b/os-posix.c
index dbf3b24..83b14a0 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -45,6 +45,10 @@
  #include <sys/syscall.h>
  #endif

+#ifdef __FreeBSD__
+#include <sys/sysctl.h>
+#endif
+
  #ifdef CONFIG_EVENTFD
  #include <sys/eventfd.h>
  #endif
