]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: include buffer.h in decode-file-flags.h
authorThomas Weißschuh <thomas@t-8ch.de>
Sun, 28 Apr 2024 21:23:47 +0000 (23:23 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sun, 28 Apr 2024 21:28:23 +0000 (23:28 +0200)
buffer.h does not pull in the full c.h with it side-effects,
so it can be used now.

Drop the now unnecessary extern declarations.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
lsfd-cmd/decode-file-flags.c
lsfd-cmd/decode-file-flags.h

index 7035d79d17f8d1ace9810278e0ea37e325f8e8e2..3f7ecd8f71246c5a2d34bda73ff57fe034b826c6 100644 (file)
 #error "kernel's fcntl.h is not available"
 #endif
 
-#include <stddef.h>            /* for size_t */
-
 #include "decode-file-flags.h"
 
-/* We cannot include buffer.h because buffer.h includes
- * /usr/include/fcntl.h indirectly. */
-extern int ul_buffer_is_empty(struct ul_buffer *buf);
-extern int ul_buffer_append_data(struct ul_buffer *buf, const char *data, size_t sz);
-extern int ul_buffer_append_string(struct ul_buffer *buf, const char *str);
-
 void lsfd_decode_file_flags(struct ul_buffer *buf, int flags)
 {
 #define SET_FLAG_FULL(L,s)                                             \
index 88cd0d0bef052370039c6f3550dbf86f24c3fc82..5c045fd5a4b14c343fd9b3ebd8cb35243cb06e88 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef UTIL_LINUX_LSFD_DECODE_FILE_FLAGS_H
 #define UTIL_LINUX_LSFD_DECODE_FILE_FLAGS_H
 
-struct ul_buffer;
+#include "buffer.h"
 
 void lsfd_decode_file_flags(struct ul_buffer *buf, int flags);