diff options
Diffstat (limited to 'filesystems/fuse-chironfs/patches/patch-ac')
-rw-r--r-- | filesystems/fuse-chironfs/patches/patch-ac | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/filesystems/fuse-chironfs/patches/patch-ac b/filesystems/fuse-chironfs/patches/patch-ac new file mode 100644 index 00000000000..5cfabab75da --- /dev/null +++ b/filesystems/fuse-chironfs/patches/patch-ac @@ -0,0 +1,75 @@ +$NetBSD: patch-ac,v 1.1.1.1 2007/11/27 18:55:40 pooka Exp $ + +--- src/chironfs.c.orig 2007-11-27 17:00:15.000000000 +0100 ++++ src/chironfs.c 2007-11-27 19:08:07.000000000 +0100 +@@ -27,8 +27,7 @@ + #define FUSE_USE_VERSION 25 + + #include <fuse.h> +-#include <fuse/fuse.h> +-#include <fuse/fuse_opt.h> ++#include <fuse_opt.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +@@ -43,13 +42,17 @@ + #ifdef HAVE_SETXATTR + #include <sys/xattr.h> + #endif ++#ifdef __linux__ + #include <linux/limits.h> + #include <mntent.h> +-#include <stdint.h> + #include <bits/wordsize.h> ++#endif ++#include <stdint.h> + #include <pwd.h> + #include <grp.h> + ++#include "config.h" ++ + #define _CHIRON_H_ + #include "chironfs.h" + +@@ -186,6 +189,16 @@ + } + } + ++char *do_realpath(const char *path, char *resolvedpath) ++{ ++ ++#ifndef __linux__ ++ if (resolvedpath == NULL) ++ resolvedpath = malloc(PATH_MAX); ++#endif ++ return realpath(path, resolvedpath); ++} ++ + //////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////// + // +@@ -2234,7 +2247,7 @@ + return(NULL); + } + } else { +- realbasedir = realpath(basedir,NULL); ++ realbasedir = do_realpath(basedir,NULL); + if (realbasedir==NULL) { + free(basedir); + return(NULL); +@@ -2383,6 +2396,7 @@ + dbg(("\nfuse_argv: %s %s %s", fuse_argv[0], fuse_argv[1], fuse_argv[2])); + dbg(("\n-------------------------------------------------------------------------------")); + ++#ifdef HAVE_GETMNTENT + FILE *mtab; + struct mntent *mntentry; + mtab = setmntent("/etc/mtab", "r"); +@@ -2393,6 +2407,7 @@ + } + } while(mntentry!=NULL); + endmntent (mtab); ++#endif + dbg(("\n-------------------------------------------------------------------------------")); + + res = fuse_main(3, fuse_argv, &chiron_oper); |