CI: fix build on FreeBSD & SunOS

This commit is contained in:
Carter Li
2024-08-08 15:36:17 +08:00
parent 1394a0ae2e
commit 79c02ebf7c
2 changed files with 3 additions and 2 deletions
+3 -1
View File
@@ -69,7 +69,7 @@ cmake_dependent_option(ENABLE_FREETYPE "Enable freetype" ON "ANDROID" OFF)
cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR SunOS" OFF)
cmake_dependent_option(ENABLE_DDCUTIL "Enable ddcutil" ON "LINUX" OFF)
cmake_dependent_option(ENABLE_DIRECTX_HEADERS "Enable DirectX headers for WSL" ON "LINUX" OFF)
cmake_dependent_option(ENABLE_ELF "Enable libelf" ON "LINUX" OFF)
cmake_dependent_option(ENABLE_ELF "Enable libelf" ON "LINUX OR FreeBSD OR SunOS" OFF)
cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND" OFF)
option(ENABLE_SYSTEM_YYJSON "Use system provided (instead of fastfetch embedded) yyjson library" OFF)
@@ -621,6 +621,7 @@ elseif(FreeBSD)
src/detection/wmtheme/wmtheme_linux.c
src/detection/camera/camera_linux.c
src/util/platform/FFPlatform_unix.c
src/util/linux/elf.c
)
elseif(APPLE)
list(APPEND LIBFASTFETCH_SRC
@@ -828,6 +829,7 @@ elseif(SunOS)
src/detection/wmtheme/wmtheme_linux.c
src/detection/camera/camera_nosupport.c
src/util/platform/FFPlatform_unix.c
src/util/linux/elf.c
)
endif()
-1
View File
@@ -38,7 +38,6 @@ const char* ffElfExtractStrings(const char* elfFile, bool (*cb)(const char* str,
}
Elf_Scn* scn = NULL;
FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate();
while ((scn = ffelf_nextscn(elf, scn)) != NULL)
{
Elf64_Shdr* shdr64 = ffelf64_getshdr(scn);