Packages (NetBSD): add support

This commit is contained in:
Carter Li
2024-10-30 22:42:46 +08:00
parent 6ccc6124d0
commit 3f41306c91
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -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
+7 -1
View File
@@ -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);
}
}