]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: include linux/fcntl.h
authorThomas Weißschuh <thomas@t-8ch.de>
Sun, 28 Apr 2024 21:35:12 +0000 (23:35 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sun, 28 Apr 2024 22:05:16 +0000 (00:05 +0200)
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>
configure.ac
lsfd-cmd/decode-file-flags.c
meson.build

index 1d7a9cf70af409cebbf9d838f739b87e063e6a6d..5143d74c16c1a8ec0f94f3657938b01747c8731e 100644 (file)
@@ -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 \
index bd87c7d794f3e4e566ff382d63f3665b136f0ec6..29c8999cd3e0e91d67fbd76880e92b6d46dea47a 100644 (file)
 
 /* 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;
index 06f1400f6ba715750edf91a8c982e2d54556bd3b..597314e569ab2e7794ba3e12982673ea4f50fb60 100644 (file)
@@ -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