From e6d7c3dd81d0a0ddec3a8b24edcbdbca519c54cc Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 9 Nov 2004 15:40:23 +0000 Subject: [PATCH] fix --- lufis/ChangeLog | 4 ++++ lufis/Makefile | 15 +++++++++++++-- lufis/dircache.c | 4 ++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lufis/ChangeLog b/lufis/ChangeLog index 6b4b644..d3256b4 100644 --- a/lufis/ChangeLog +++ b/lufis/ChangeLog @@ -1,3 +1,7 @@ +2004-10-09 Miklos Szeredi + + * Fix compilation with post 1.9 FUSE + 2004-03-09 Miklos Szeredi * Make it possible to mount captivefs filesystem diff --git a/lufis/Makefile b/lufis/Makefile index 713e509..5ff0392 100644 --- a/lufis/Makefile +++ b/lufis/Makefile @@ -1,6 +1,17 @@ CC = gcc -CFLAGS = -Wall -W -g -LDLIBS = -lfuse -lpthread -ldl -rdynamic + +CFLAGS := -Wall -W -g +LDLIBS := -lpthread -ldl -rdynamic + +PKGCONFIG := env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config +FUSEVER := $(shell $(PKGCONFIG) --modversion fuse 2> /dev/null) +ifeq ($(FUSEVER),) + LDLIBS += -lfuse +else + CFLAGS += $(shell $(PKGCONFIG) --cflags fuse) + LDLIBS += $(shell $(PKGCONFIG) --libs fuse) +endif + CPPFLAGS := -D_FILE_OFFSET_BITS=64 #CPPFLAGS += -DDEBUG diff --git a/lufis/dircache.c b/lufis/dircache.c index 0498355..bdd8717 100644 --- a/lufis/dircache.c +++ b/lufis/dircache.c @@ -305,7 +305,11 @@ int lu_cache_readdir(struct dir_cache *cache, char *dir, list_for_each(p, &d->d_entries){ de = list_entry(p, struct direntry, e_list); +#if FUSE_MAJOR_VERSION < 2 || (FUSE_MAJOR_VERSION == 2 && FUSE_MINOR_VERSION < 1) filler(h, de->e_name, 0); +#else + filler(h, de->e_name, 0, 0); +#endif } d->d_stamp = time(NULL); -- 2.30.2