diff --git a/share/examples/refuse/virtdir/virtdir.c b/share/examples/refuse/virtdir/virtdir.c index 92a52a4db124..3a7398807184 100644 --- a/share/examples/refuse/virtdir/virtdir.c +++ b/share/examples/refuse/virtdir/virtdir.c @@ -28,6 +28,8 @@ #include #include +#define FUSE_USE_VERSION 26 + #include #include #include @@ -173,7 +175,7 @@ virtdir_del(virtdir_t *tp, const char *name, size_t size) if ((ep = virtdir_find(tp, name, size)) == NULL) { return 0; } - i = (int)(ep - tp->v) / sizeof(tp->v[0]); + i = (int)(ep - tp->v); for (tp->c -= 1 ; i < tp->c ; i++) { tp->v[i] = tp->v[i + 1]; }