aboutsummaryrefslogtreecommitdiffstats
path: root/example/ioctl.c
diff options
context:
space:
mode:
authorFredyVia <942513309@qq.com>2024-03-20 23:08:04 +0800
committerGitHub <noreply@github.com>2024-03-20 16:08:04 +0100
commitc021e910a5592756f7c3fa47f89d83e41c8a3505 (patch)
tree533e0e2d83802b7007b30b2b21cad9ec7928f8d2 /example/ioctl.c
parent9a823df6d91869960b733581dc71ccefcbe92cc3 (diff)
downloadlibfuse-c021e910a5592756f7c3fa47f89d83e41c8a3505.tar.gz
Add FUSE_FILL_DIR_DEFAULTS enum (#903)
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
Diffstat (limited to 'example/ioctl.c')
-rw-r--r--example/ioctl.c6
1 files changed, 3 insertions, 3 deletions
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;
}