Skip to content

Commit 3f41306

Browse files
committed
Packages (NetBSD): add support
1 parent 6ccc612 commit 3f41306

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ elseif(NetBSD)
724724
src/detection/netio/netio_nosupport.c
725725
src/detection/opengl/opengl_linux.c
726726
src/detection/os/os_nbsd.c
727-
src/detection/packages/packages_nosupport.c
727+
src/detection/packages/packages_obsd.c
728728
src/detection/poweradapter/poweradapter_nosupport.c
729729
src/detection/processes/processes_nosupport.c
730730
src/detection/gtk_qt/qt.c

src/detection/packages/packages_obsd.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ void ffDetectPackagesImpl(FFPackagesResult* result, FFPackagesOptions* options)
2626
{
2727
if (!(options->disabled & FF_PACKAGES_FLAG_PKG_BIT))
2828
{
29-
result->pkg = getNumElementsImpl(FASTFETCH_TARGET_DIR_ROOT "/var/db/pkg", DT_DIR);
29+
result->pkg = getNumElementsImpl(FASTFETCH_TARGET_DIR_ROOT
30+
#if __OpenBSD
31+
"/var/db/pkg"
32+
#else
33+
"/usr/pkg/pkgdb"
34+
#endif
35+
, DT_DIR);
3036
}
3137
}

0 commit comments

Comments
 (0)