diff --git a/src/common/sysctl.c b/src/common/sysctl.c index 8c933d1fe..526323458 100644 --- a/src/common/sysctl.c +++ b/src/common/sysctl.c @@ -1,7 +1,6 @@ #include "sysctl.h" #include -#include void ffSysctlGetString(const char* propName, FFstrbuf* result) { @@ -35,7 +34,7 @@ int64_t ffSysctlGetInt64(const char* propName, int64_t defaultValue) return result; } -void* ffSysctlGetData(int* request, int requestLength, size_t* resultLength) +void* ffSysctlGetData(int* request, u_int requestLength, size_t* resultLength) { if(sysctl(request, requestLength, NULL, resultLength, NULL, 0) != 0) return NULL; diff --git a/src/common/sysctl.h b/src/common/sysctl.h index 7669a043a..ebaab050d 100644 --- a/src/common/sysctl.h +++ b/src/common/sysctl.h @@ -4,10 +4,11 @@ #define FF_INCLUDED_common_sysctl #include "fastfetch.h" +#include void ffSysctlGetString(const char* propName, FFstrbuf* result); int ffSysctlGetInt(const char* propName, int defaultValue); int64_t ffSysctlGetInt64(const char* propName, int64_t defaultValue); -void* ffSysctlGetData(int* request, int requestLength, size_t* resultLength); +void* ffSysctlGetData(int* request, u_int requestLength, size_t* resultLength); #endif diff --git a/src/detection/memory/memory_apple.c b/src/detection/memory/memory_apple.c index 260da072c..548098a65 100644 --- a/src/detection/memory/memory_apple.c +++ b/src/detection/memory/memory_apple.c @@ -1,5 +1,5 @@ #include "memory.h" -#include "common/systcl.h" +#include "common/sysctl.h" #include #include diff --git a/src/util/apple/cfdict_helpers.c b/src/util/apple/cfdict_helpers.c index 9dd50ba9b..68ee0642b 100644 --- a/src/util/apple/cfdict_helpers.c +++ b/src/util/apple/cfdict_helpers.c @@ -16,7 +16,7 @@ bool ffCfDictGetString(CFDictionaryRef dict, CFStringRef key, FFstrbuf* result) { // CFStringGetCString ensures the buffer is NUL terminated // https://developer.apple.com/documentation/corefoundation/1542721-cfstringgetcstring - result->length = strnlen(result->chars, (uint32_t)result->allocated); + result->length = (uint32_t) strnlen(result->chars, (uint32_t)result->allocated); } } else if(CFGetTypeID(cf) == CFDataGetTypeID())