0

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 *);
rae1
  • 6,066
  • 4
  • 27
  • 48
Antigluk
  • 1,176
  • 2
  • 11
  • 30

3 Answers3

1

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

Source of solution is this discussion.

coelhudo
  • 4,710
  • 7
  • 38
  • 57
0

if you have a makefile add to your CFLAGS the appropriate define -DFUSE_USE_VERSION=26 so you want a line like this: CFLAGS += -DFUSE_USE_VERSION=26

Vasileios Lekakis
  • 5,492
  • 2
  • 15
  • 17
0

What you've done seems correct, so I don't know why you are getting that error. My first guess would be that its a side effect of some other error. Is that the only error you get when you compile, or are there others?

swestrup
  • 4,079
  • 3
  • 22
  • 33