--- CMakeLists.txt.orig	2022-06-01 21:01:35 UTC
+++ CMakeLists.txt
@@ -36,7 +36,8 @@ include(cmake/CopyIfNotExists.cmake)
 include(cmake/CopyIfNotExists.cmake)
 
 # Settings
-if(EXISTS "/proc/loadavg")
+check_function_exists(getloadavg HAVE_GETLOADAVG)
+if(HAVE_GETLOADAVG OR EXISTS "/proc/loadavg")
 	option(ENABLE_LOADCHECK "Enable the ability to check for server load." on)
 endif()
 set(CONFIG_DIR ${CMAKE_INSTALL_FULL_SYSCONFDIR}/hiawatha CACHE STRING "Configuration directory")
