From: Thomas Weißschuh Date: Sun, 28 Apr 2024 21:35:12 +0000 (+0200) Subject: lsfd: include linux/fcntl.h X-Git-Tag: v2.42-start~375^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6e6fb4a3e8a2025d67eb4ea4c82711a530184f8;p=thirdparty%2Futil-linux.git 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 --- diff --git a/configure.ac b/configure.ac index 1d7a9cf70..5143d74c1 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 bd87c7d79..29c8999cd 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 -#elif defined HAVE_ASM_GENERIC_FCNTL_H -#include -#else -#error "kernel's fcntl.h is not available" -#endif +#include #include /* for size_t */ struct ul_buffer; diff --git a/meson.build b/meson.build index 06f1400f6..597314e56 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