From: Thomas Weißschuh Date: Sun, 28 Apr 2024 21:23:47 +0000 (+0200) Subject: lsfd: include buffer.h in decode-file-flags.h X-Git-Tag: v2.42-start~371^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c33c715b926f82908ae75f19c35baf42da9e05b;p=thirdparty%2Futil-linux.git lsfd: include buffer.h in decode-file-flags.h 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 --- diff --git a/lsfd-cmd/decode-file-flags.c b/lsfd-cmd/decode-file-flags.c index 7035d79d1..3f7ecd8f7 100644 --- a/lsfd-cmd/decode-file-flags.c +++ b/lsfd-cmd/decode-file-flags.c @@ -49,16 +49,8 @@ #error "kernel's fcntl.h is not available" #endif -#include /* 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) \ diff --git a/lsfd-cmd/decode-file-flags.h b/lsfd-cmd/decode-file-flags.h index 88cd0d0be..5c045fd5a 100644 --- a/lsfd-cmd/decode-file-flags.h +++ b/lsfd-cmd/decode-file-flags.h @@ -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);