diff --git a/CMakeLists.txt b/CMakeLists.txt index 70c5ff92c..0d2ad783d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1411,7 +1411,7 @@ elseif(OpenBSD) elseif(DragonFly) target_compile_definitions(libfastfetch PUBLIC __FreeBSD__) elseif(SunOS) - target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE __STDC_WANT_LIB_EXT1__ _FILE_OFFSET_BITS=64 __EXTENSIONS__ _POSIX_C_SOURCE) + target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE __STDC_WANT_LIB_EXT1__ _FILE_OFFSET_BITS=64 __EXTENSIONS__ _POSIX_C_SOURCE) elseif(NetBSD) target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-char-subscripts") diff --git a/src/detection/localip/localip_linux.c b/src/detection/localip/localip_linux.c index 07138a4d6..2e525dd04 100644 --- a/src/detection/localip/localip_linux.c +++ b/src/detection/localip/localip_linux.c @@ -339,8 +339,8 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results) } } - FF_DEBUG("Processing interface %s (family=%d, flags=0x%x)", - ifa->ifa_name, ifa->ifa_addr->sa_family, ifa->ifa_flags); + FF_DEBUG("Processing interface %s (family=%d, flags=0x%lx)", + ifa->ifa_name, ifa->ifa_addr->sa_family, (unsigned long) ifa->ifa_flags); FFAdapter* adapter = NULL; FF_LIST_FOR_EACH(FFAdapter, x, adapters) diff --git a/src/detection/memory/memory_sunos.c b/src/detection/memory/memory_sunos.c index 1df271055..f390d0ae3 100644 --- a/src/detection/memory/memory_sunos.c +++ b/src/detection/memory/memory_sunos.c @@ -3,8 +3,8 @@ const char* ffDetectMemory(FFMemoryResult* ram) { - ram->bytesTotal = sysconf(_SC_PHYS_PAGES) * instance.state.platform.sysinfo.pageSize; - ram->bytesUsed = ram->bytesTotal - sysconf(_SC_AVPHYS_PAGES) * instance.state.platform.sysinfo.pageSize; + ram->bytesTotal = (uint64_t) sysconf(_SC_PHYS_PAGES) * instance.state.platform.sysinfo.pageSize; + ram->bytesUsed = ram->bytesTotal - (uint64_t) sysconf(_SC_AVPHYS_PAGES) * instance.state.platform.sysinfo.pageSize; return NULL; }