getdir related API change
diff --git a/lib/fuse.c b/lib/fuse.c
index 6b42252..ddb7ce3 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -429,13 +429,17 @@
 #endif
 }
 
-static int fill_dir(struct fuse_dirhandle *dh, char *name, int type)
+static int fill_dir(struct fuse_dirhandle *dh, const char *name, int type,
+                    ino_t ino)
 {
     struct fuse_dirent dirent;
     size_t reclen;
     size_t res;
 
-    dirent.ino = (unsigned long) -1;
+    if ((dh->fuse->flags & FUSE_USE_INO))
+        dirent.ino = ino;
+    else
+        dirent.ino = (unsigned long) -1;
     dirent.namelen = strlen(name);
     strncpy(dirent.name, name, sizeof(dirent.name));
     dirent.type = type;
@@ -821,7 +825,7 @@
         if (path != NULL) {
             res = -ENOSYS;
             if (f->op.getdir)
-                res = f->op.getdir(path, &dh, (fuse_dirfil_t) fill_dir);
+                res = f->op.getdir(path, &dh, fill_dir);
             free(path);
         }
         fflush(dh.fp);