Skip to contentSkip to conversation

f2fs-tools: remove linux/fcntl.h but define the hint directly

PATCH In review Jaegeuk Kim via Linux-f2fs-devel 1 participant 2 messages Oct 15, 2024 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs-tools: remove linux/fcntl.h but define the hint directly

It's complicated to address libc and kernel headers.

---
 lib/libf2fs_io.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
lib/libf2fs_io.c +5 -5
index 1923c0b87dfc..520ae0362fd4 100644
@@ -34,16 +34,16 @@
 #include <linux/hdreg.h>
 #endif
 
+#ifndef F_SET_RW_HINT
+#define F_LINUX_SPECIFIC_BASE 	1024
+#define F_SET_RW_HINT		(F_LINUX_SPECIFIC_BASE + 12)
+#endif
+
 #include <stdbool.h>
 #include <assert.h>
 #include <inttypes.h>
 #include "f2fs_fs.h"
 
-#ifdef HAVE_LINUX_FCNTL_H
-#define HAVE_ARCH_STRUCT_FLOCK
-#include <linux/fcntl.h>
-#endif
-
 struct f2fs_configuration c;
 
 #ifdef HAVE_SPARSE_SPARSE_H
Signature · 8 lines
2.47.0.rc1.288.g06298d1525-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel