diff --git a/CMakeLists.txt b/CMakeLists.txt index be038300b..f024d55a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -724,7 +724,7 @@ elseif(NetBSD) src/detection/netio/netio_nosupport.c src/detection/opengl/opengl_linux.c src/detection/os/os_nbsd.c - src/detection/packages/packages_nosupport.c + src/detection/packages/packages_obsd.c src/detection/poweradapter/poweradapter_nosupport.c src/detection/processes/processes_nosupport.c src/detection/gtk_qt/qt.c diff --git a/src/detection/packages/packages_obsd.c b/src/detection/packages/packages_obsd.c index c7fadcbdf..79d383ed4 100644 --- a/src/detection/packages/packages_obsd.c +++ b/src/detection/packages/packages_obsd.c @@ -26,6 +26,12 @@ void ffDetectPackagesImpl(FFPackagesResult* result, FFPackagesOptions* options) { if (!(options->disabled & FF_PACKAGES_FLAG_PKG_BIT)) { - result->pkg = getNumElementsImpl(FASTFETCH_TARGET_DIR_ROOT "/var/db/pkg", DT_DIR); + result->pkg = getNumElementsImpl(FASTFETCH_TARGET_DIR_ROOT + #if __OpenBSD + "/var/db/pkg" + #else + "/usr/pkg/pkgdb" + #endif + , DT_DIR); } }