Saturday, August 03, 2024

Re: new (wip-ish): sysutils/plocate

On Fri, Aug 02, 2024 at 06:14:47PM +0100, Stuart Henderson wrote:
> Biggest yucky bit with the port if used as a "standard" locate tool is
> that the code to check filesystem types is Linux-only and I haven't
> added an OpenBSD implementation, so you can't easily disable (e.g.)
> "all NFS partitions", you've got to specify paths to skip.

I've looked at the FreeBSD port, puked in my mouth a bit
(I assume they already got that horrible compat code from somewhere else)
and wrote a quickie using statfs

Should work.

New port attached. I also took the liberty of silencing
some crazy warning from modern clang.
(no idea if it's possible to do that directly on the
meson command line)



Index: updatedb.cpp
--- updatedb.cpp.orig
+++ updatedb.cpp
@@ -43,7 +43,12 @@ any later version.
#include <iosfwd>
#include <math.h>
#include <memory>
+#ifdef __OpenBSD__
+#include <sys/types.h>
+#include <sys/mount.h>
+#else
#include <mntent.h>
+

No comments:

Post a Comment