summaryrefslogtreecommitdiffstats
path: root/examples/VFS/block/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/VFS/block/block.c')
-rw-r--r--examples/VFS/block/block.c14
1 files changed, 13 insertions, 1 deletions
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;