Skip to content

Commit 79c02eb

Browse files
committed
CI: fix build on FreeBSD & SunOS
1 parent 1394a0a commit 79c02eb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ cmake_dependent_option(ENABLE_FREETYPE "Enable freetype" ON "ANDROID" OFF)
6969
cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR SunOS" OFF)
7070
cmake_dependent_option(ENABLE_DDCUTIL "Enable ddcutil" ON "LINUX" OFF)
7171
cmake_dependent_option(ENABLE_DIRECTX_HEADERS "Enable DirectX headers for WSL" ON "LINUX" OFF)
72-
cmake_dependent_option(ENABLE_ELF "Enable libelf" ON "LINUX" OFF)
72+
cmake_dependent_option(ENABLE_ELF "Enable libelf" ON "LINUX OR FreeBSD OR SunOS" OFF)
7373
cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND" OFF)
7474

7575
option(ENABLE_SYSTEM_YYJSON "Use system provided (instead of fastfetch embedded) yyjson library" OFF)
@@ -621,6 +621,7 @@ elseif(FreeBSD)
621621
src/detection/wmtheme/wmtheme_linux.c
622622
src/detection/camera/camera_linux.c
623623
src/util/platform/FFPlatform_unix.c
624+
src/util/linux/elf.c
624625
)
625626
elseif(APPLE)
626627
list(APPEND LIBFASTFETCH_SRC
@@ -828,6 +829,7 @@ elseif(SunOS)
828829
src/detection/wmtheme/wmtheme_linux.c
829830
src/detection/camera/camera_nosupport.c
830831
src/util/platform/FFPlatform_unix.c
832+
src/util/linux/elf.c
831833
)
832834
endif()
833835

src/util/linux/elf.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ const char* ffElfExtractStrings(const char* elfFile, bool (*cb)(const char* str,
3838
}
3939

4040
Elf_Scn* scn = NULL;
41-
FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate();
4241
while ((scn = ffelf_nextscn(elf, scn)) != NULL)
4342
{
4443
Elf64_Shdr* shdr64 = ffelf64_getshdr(scn);

0 commit comments

Comments
 (0)