SunOS: support loadavg detection

This commit is contained in:
Carter Li
2024-06-17 15:23:35 +08:00
parent 76b8446d15
commit 74a364e3f2
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -776,7 +776,7 @@ elseif(SunOS)
src/detection/initsystem/initsystem_linux.c
src/detection/libc/libc_nosupport.c
src/detection/lm/lm_nosupport.c
src/detection/loadavg/loadavg_nosupport.c
src/detection/loadavg/loadavg_sunos.c
src/detection/locale/locale_linux.c
src/detection/localip/localip_linux.c
src/detection/gamepad/gamepad_nosupport.c
+8
View File
@@ -0,0 +1,8 @@
#include "detection/loadavg/loadavg.h"
#include <sys/loadavg.h>
const char* ffDetectLoadavg(double result[3])
{
return getloadavg(result, 3) == 3 ? NULL : "getloadavg() failed";
}