aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2024-04-28 23:35:12 +0200
committerThomas Weißschuh <thomas@t-8ch.de>2024-04-29 00:05:16 +0200
commitb6e6fb4a3e8a2025d67eb4ea4c82711a530184f8 (patch)
tree129f11b504a3bbdda94cb48bab11a7753dbbdc01
parent93128b74c439e9faba7c7a3912cb4312bcc087d1 (diff)
downloadutil-linux-b6e6fb4a3e8a2025d67eb4ea4c82711a530184f8.tar.gz
lsfd: include linux/fcntl.h
asm/-headers are implementation details and not meant to be included directly. Instead use the linux/ header which will always include the correct asm/-headers. Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
-rw-r--r--configure.ac2
-rw-r--r--lsfd-cmd/decode-file-flags.c16
-rw-r--r--meson.build2
3 files changed, 5 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 1d7a9cf70a..5143d74c16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -317,8 +317,6 @@ AC_CHECK_HEADERS([linux/compiler.h linux/blkpg.h linux/major.h], [], [], [
#endif
])
AC_CHECK_HEADERS([ \
- asm-generic/fcntl.h \
- asm/fcntl.h \
asm/io.h \
byteswap.h \
endian.h \
diff --git a/lsfd-cmd/decode-file-flags.c b/lsfd-cmd/decode-file-flags.c
index bd87c7d794..29c8999cd3 100644
--- a/lsfd-cmd/decode-file-flags.c
+++ b/lsfd-cmd/decode-file-flags.c
@@ -24,30 +24,24 @@
/* lsfd_decode_file_flags() is for decoding `flags' field of
* /proc/$pid/fdinfo/$fd. Bits of the field have name defined
- * in fctl.h.
+ * in fcntl.h.
* A system on which lsfd is built may have multiple
- * fctl.h files:
+ * fcntl.h files:
*
+ * - /usr/include/linux/fcntl.h (a part of Linux kernel)
* - /usr/include/asm/fcntl.h (a part of Linux kernel)
* - /usr/include/asm-generic/fcntl.h (a part of Linux kernel)
* - /usr/include/fcntl.h (a part of glibc)
* - /usr/include/bits/fcntl.h (a part of glibc)
*
- * For decoding purpose, /usr/include/asm/fcntl.h or
- * /usr/include/asm-generic/fcntl.h is needed.
+ * For decoding purpose, /usr/include/linuc/fcntl.h is needed.
*
* /usr/include/bits/fcntl.h and /usr/include/fcntl.h are
* not suitable for decoding. They should not be included.
* /usr/include/fcntl.h includes /usr/include/bits/fcntl.h.
*/
-#if defined HAVE_ASM_FCNTL_H
-#include <asm/fcntl.h>
-#elif defined HAVE_ASM_GENERIC_FCNTL_H
-#include <asm-generic/fcntl.h>
-#else
-#error "kernel's fcntl.h is not available"
-#endif
+#include <linux/fcntl.h>
#include <stddef.h> /* for size_t */
struct ul_buffer;
diff --git a/meson.build b/meson.build
index 06f1400f6b..597314e569 100644
--- a/meson.build
+++ b/meson.build
@@ -189,8 +189,6 @@ headers = '''
unistd.h
utmp.h
utmpx.h
- asm-generic/fcntl.h
- asm/fcntl.h
asm/io.h
linux/blkzoned.h
linux/capability.h