diff options
Diffstat (limited to 'examples/VFS/block')
-rw-r--r-- | examples/VFS/block/Makefile | 37 | ||||
-rw-r--r-- | examples/VFS/block/block.c | 14 |
2 files changed, 13 insertions, 38 deletions
diff --git a/examples/VFS/block/Makefile b/examples/VFS/block/Makefile deleted file mode 100644 index 4887915fb4f..00000000000 --- a/examples/VFS/block/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# -# Makefile for samba-vfs examples -# -# - -# Variables - -CC = gcc -LIBTOOL = libtool - -SAMBA_SRC = ../../../source -SAMBA_INCL = ${SAMBA_SRC}/include -UBIQX_SRC = ${SAMBA_SRC}/ubiqx -SMBWR_SRC = ${SAMBA_SRC}/smbwrapper -CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g - - -VFS_OBJS = block.so - -# Default target - -default: $(VFS_OBJS) - -# Pattern rules - -%.so: %.lo - $(LIBTOOL) $(CC) -shared -o $@ $< $(LDFLAGS) - -%.lo: %.c - $(LIBTOOL) $(CC) $(CPPFLAGS) $(CFLAGS) -c $< - -# Misc targets - -clean: - rm -rf .libs - rm -f core *~ *% *.bak \ - $(VFS_OBJS) $(VFS_OBJS:.so=.o) $(VFS_OBJS:.so=.lo) diff --git a/examples/VFS/block/block.c b/examples/VFS/block/block.c index 8c0fa61d506..a8b17a35dd4 100644 --- a/examples/VFS/block/block.c +++ b/examples/VFS/block/block.c @@ -47,6 +47,7 @@ + DIR *block_opendir(struct connection_struct *conn, const char *fname); int block_connect(struct connection_struct *conn, const char *service, const char *user); void block_disconnect(struct connection_struct *conn); @@ -461,7 +462,18 @@ BOOL search(struct stat *stat_buf) BOOL dir_search(char *link, const char *dir) { - char buf[PATH_MAX +1], *ext_path; + char *ext_path; + +#ifdef PATH_MAX + char buf[PATH_MAX +1]; +#else +#ifdef MAXPATHLEN + char buf[MAXPATHLEN +1]; +#else + char buf[BUFSIZ]; +#endif +#endif + int len = 0; struct block_dir *tmp_pblock = pblock_dir; |