@@ -20,6 +20,8 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
2020 set (FreeBSD TRUE CACHE BOOL "..." FORCE)
2121elseif ("${CMAKE_SYSTEM_NAME} " STREQUAL "OpenBSD" )
2222 set (OpenBSD TRUE CACHE BOOL "..." FORCE)
23+ elseif ("${CMAKE_SYSTEM_NAME} " STREQUAL "NetBSD" )
24+ set (NetBSD TRUE CACHE BOOL "..." FORCE)
2325elseif ("${CMAKE_SYSTEM_NAME} " STREQUAL "SunOS" )
2426 set (SunOS TRUE CACHE BOOL "..." FORCE)
2527elseif (NOT APPLE AND NOT WIN32 )
@@ -663,6 +665,88 @@ elseif(FreeBSD)
663665 src/util/platform/FFPlatform_unix.c
664666 src/util/binary_linux.c
665667 )
668+ elseif (NetBSD)
669+ list (APPEND LIBFASTFETCH_SRC
670+ src/common/dbus.c
671+ src/common/io/io_unix.c
672+ src/common/netif/netif_bsd.c
673+ src/common/networking_linux.c
674+ src/common/processing_linux.c
675+ src/common/sysctl.c
676+ src/detection/battery/battery_nosupport.c
677+ src/detection/bios/bios_nbsd.c
678+ src/detection/bluetooth/bluetooth_linux.c
679+ src/detection/bluetoothradio/bluetoothradio_linux.c
680+ src/detection/board/board_nbsd.c
681+ src/detection/bootmgr/bootmgr_nosupport.c
682+ src/detection/brightness/brightness_bsd.c
683+ src/detection/btrfs/btrfs_nosupport.c
684+ src/detection/chassis/chassis_nbsd.c
685+ src/detection/cpu/cpu_bsd.c
686+ src/detection/cpucache/cpucache_nosupport.c
687+ src/detection/cpuusage/cpuusage_nosupport.c
688+ src/detection/cursor/cursor_linux.c
689+ src/detection/disk/disk_nosupport.c
690+ src/detection/dns/dns_linux.c
691+ src/detection/physicaldisk/physicaldisk_nosupport.c
692+ src/detection/physicalmemory/physicalmemory_nosupport.c
693+ src/detection/diskio/diskio_nosupport.c
694+ src/detection/displayserver/linux/displayserver_linux.c
695+ src/detection/displayserver/linux/drm.c
696+ src/detection/displayserver/linux/wayland/wayland.c
697+ src/detection/displayserver/linux/wayland/global -output .c
698+ src/detection/displayserver/linux/wayland/zwlr-output .c
699+ src/detection/displayserver/linux/wayland/kde-output .c
700+ src/detection/displayserver/linux/wayland/wlr-output -management-unstable-v1-protocol.c
701+ src/detection/displayserver/linux/wayland/kde-output -device-v2-protocol.c
702+ src/detection/displayserver/linux/wayland/kde-output -order-v1-protocol.c
703+ src/detection/displayserver/linux/wayland/xdg-output -unstable-v1-protocol.c
704+ src/detection/displayserver/linux/wmde.c
705+ src/detection/displayserver/linux/xcb.c
706+ src/detection/displayserver/linux/xlib.c
707+ src/detection/font/font_linux.c
708+ src/detection/gpu/gpu_nosupport.c
709+ src/detection/gpu/gpu_pci.c
710+ src/detection/gtk_qt/gtk.c
711+ src/detection/host/host_nbsd.c
712+ src/detection/lm/lm_linux.c
713+ src/detection/icons/icons_linux.c
714+ src/detection/initsystem/initsystem_linux.c
715+ src/detection/keyboard/keyboard_nosupport.c
716+ src/detection/libc/libc_nosupport.c
717+ src/detection/loadavg/loadavg_bsd.c
718+ src/detection/locale/locale_linux.c
719+ src/detection/localip/localip_linux.c
720+ src/detection/gamepad/gamepad_nosupport.c
721+ src/detection/media/media_linux.c
722+ src/detection/memory/memory_bsd.c
723+ src/detection/mouse/mouse_nosupport.c
724+ src/detection/netio/netio_nosupport.c
725+ src/detection/opengl/opengl_linux.c
726+ src/detection/os/os_nbsd.c
727+ src/detection/packages/packages_nosupport.c
728+ src/detection/poweradapter/poweradapter_nosupport.c
729+ src/detection/processes/processes_nosupport.c
730+ src/detection/gtk_qt/qt.c
731+ src/detection/sound/sound_nosupport.c
732+ src/detection/swap/swap_nosupport.c
733+ src/detection/terminalfont/terminalfont_linux.c
734+ src/detection/terminalshell/terminalshell_linux.c
735+ src/detection/terminalsize/terminalsize_linux.c
736+ src/detection/theme/theme_linux.c
737+ src/detection/tpm/tpm_nosupport.c
738+ src/detection/uptime/uptime_bsd.c
739+ src/detection/users/users_linux.c
740+ src/detection/wallpaper/wallpaper_linux.c
741+ src/detection/wifi/wifi_nosupport.c
742+ src/detection/wm/wm_nosupport.c
743+ src/detection/de/de_linux.c
744+ src/detection/wmtheme/wmtheme_linux.c
745+ src/detection/camera/camera_linux.c
746+ src/detection/zpool/zpool_linux.c
747+ src/util/platform/FFPlatform_unix.c
748+ src/util/binary_linux.c
749+ )
666750elseif (OpenBSD)
667751 list (APPEND LIBFASTFETCH_SRC
668752 src/common/dbus.c
@@ -1054,6 +1138,9 @@ elseif(OpenBSD)
10541138 target_compile_definitions (libfastfetch PUBLIC _XOPEN_SOURCE=700 _FILE_OFFSET_BITS=64 _BSD_SOURCE)
10551139elseif (SunOS)
10561140 target_compile_definitions (libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE __STDC_WANT_LIB_EXT1__ _FILE_OFFSET_BITS=64 __EXTENSIONS__ _POSIX_C_SOURCE)
1141+ elseif (NetBSD)
1142+ target_compile_definitions (libfastfetch PUBLIC _GNU_SOURCE)
1143+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-char-subscripts" )
10571144endif ()
10581145
10591146if (HAVE_STATX)
0 commit comments