Search code examples
cfuse

How to do a conversion using Fuse file system?


I'm getting this error:

Error: invalid conversion from int (*)(const char*, fuse_file_info*) to int (*)(const char*, int)

when i do

static struct fuse_operations vkfs_opers;

...

vkfs_opers.open = vkfs_open;

but function is declarated as

static int vkfs_open (const char *path, struct fuse_file_info *fi)

and in structure fuse_operations it declarated as

int (*open) (const char *, struct fuse_file_info *);

Solution

  • Try #define FUSE_USE_VERSION 26 before including <fuse.h>.

    Source of solution is this discussion.