From c021e910a5592756f7c3fa47f89d83e41c8a3505 Mon Sep 17 00:00:00 2001 From: FredyVia <942513309@qq.com> Date: Wed, 20 Mar 2024 23:08:04 +0800 Subject: Add FUSE_FILL_DIR_DEFAULTS enum (#903) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to use the fuse_fill_dir_t function in a C++ program, add the enum item: FUSE_FILL_DIR_DEFAULTS Without this change g++ compilation failed with example/hello.c:94:35: error: invalid conversion from ‘int’ to ‘fuse_fill_dir_flags’ [-fpermissive] 94 | filler(buf, ".", NULL, 0, 0); | ^ | | | int --- example/ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'example/ioctl.c') diff --git a/example/ioctl.c b/example/ioctl.c index b8dab00..9fe5c5b 100644 --- a/example/ioctl.c +++ b/example/ioctl.c @@ -181,9 +181,9 @@ static int fioc_readdir(const char *path, void *buf, fuse_fill_dir_t filler, if (fioc_file_type(path) != FIOC_ROOT) return -ENOENT; - filler(buf, ".", NULL, 0, 0); - filler(buf, "..", NULL, 0, 0); - filler(buf, FIOC_NAME, NULL, 0, 0); + filler(buf, ".", NULL, 0, FUSE_FILL_DIR_DEFAULTS); + filler(buf, "..", NULL, 0, FUSE_FILL_DIR_DEFAULTS); + filler(buf, FIOC_NAME, NULL, 0, FUSE_FILL_DIR_DEFAULTS); return 0; } -- cgit v1.2.3