ports/filesystems/mergerfs/files/patch-tools_preload.c
Robert Clausecker 6e2da9672f filesystems: add new category for file systems and related utilities
The filesystems category houses file systems and file system utilities.
It is added mainly to turn the sysutils/fusefs-* pseudo-category into
a proper one, but is also useful for the sundry of other file systems
related ports found in the tree.

Ports that seem like they belong there are moved to the new category.
Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are
not moved as they currently don't fetch and don't have TIMESTAMP set
in their distinfo, but that is required to be able to push a rename
of the port by the pre-receive hook.

Approved by:	portmgr (rene)
Reviewed by:	mat
Pull Request:	https://github.com/freebsd/freebsd-ports/pull/302
PR:		281988
2024-11-06 16:17:35 +01:00

29 lines
573 B
C

--- tools/preload.c.orig 2024-02-29 20:41:22 UTC
+++ tools/preload.c
@@ -25,10 +25,25 @@
#include <string.h>
#include <sys/ioctl.h>
#include <stdarg.h>
-#include <sys/stat.h>
+#include <sys/stat.h>
+#ifdef __linux__
+#define S_IFMT S_IFMT
+#define S_IFREG S_IFREG
+#else
+#define S_IFMT 0
+#define S_IFREG 0
+#endif
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
+
+#ifdef __linux__
+#define O_TMPFILE O_TMPFILE
+#define O_PATH O_PATH
+#else
+#define O_TMPFILE 0
+#define O_PATH 0
+#endif
typedef char IOCTL_BUF[4096];
#define IOCTL_APP_TYPE 0xDF