head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.34 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.32 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.30 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.28 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.26 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.24 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.22 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.20 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.18 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.2.0.16 pkgsrc-2023Q4-base:1.2 pkgsrc-2023Q3:1.2.0.14 pkgsrc-2023Q3-base:1.2 pkgsrc-2023Q2:1.2.0.12 pkgsrc-2023Q2-base:1.2 pkgsrc-2023Q1:1.2.0.10 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.2.0.8 pkgsrc-2022Q4-base:1.2 pkgsrc-2022Q3:1.2.0.6 pkgsrc-2022Q3-base:1.2 pkgsrc-2022Q2:1.2.0.4 pkgsrc-2022Q2-base:1.2 pkgsrc-2022Q1:1.2.0.2 pkgsrc-2022Q1-base:1.2 pkgsrc-2021Q4:1.1.0.100 pkgsrc-2021Q4-base:1.1 pkgsrc-2021Q3:1.1.0.98 pkgsrc-2021Q3-base:1.1 pkgsrc-2021Q2:1.1.0.96 pkgsrc-2021Q2-base:1.1 pkgsrc-2021Q1:1.1.0.94 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.92 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.90 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.86 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.66 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.88 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.84 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.82 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.80 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.78 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.76 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.74 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.72 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.70 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.68 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.64 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.62 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.60 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.58 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.56 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.54 pkgsrc-2016Q1-base:1.1 pkgsrc-2015Q4:1.1.0.52 pkgsrc-2015Q4-base:1.1 pkgsrc-2015Q3:1.1.0.50 pkgsrc-2015Q3-base:1.1 pkgsrc-2015Q2:1.1.0.48 pkgsrc-2015Q2-base:1.1 pkgsrc-2015Q1:1.1.0.46 pkgsrc-2015Q1-base:1.1 pkgsrc-2014Q4:1.1.0.44 pkgsrc-2014Q4-base:1.1 pkgsrc-2014Q3:1.1.0.42 pkgsrc-2014Q3-base:1.1 pkgsrc-2014Q2:1.1.0.40 pkgsrc-2014Q2-base:1.1 pkgsrc-2014Q1:1.1.0.38 pkgsrc-2014Q1-base:1.1 pkgsrc-2013Q4:1.1.0.36 pkgsrc-2013Q4-base:1.1 pkgsrc-2013Q3:1.1.0.34 pkgsrc-2013Q3-base:1.1 pkgsrc-2013Q2:1.1.0.32 pkgsrc-2013Q2-base:1.1 pkgsrc-2013Q1:1.1.0.30 pkgsrc-2013Q1-base:1.1 pkgsrc-2012Q4:1.1.0.28 pkgsrc-2012Q4-base:1.1 pkgsrc-2012Q3:1.1.0.26 pkgsrc-2012Q3-base:1.1 pkgsrc-2012Q2:1.1.0.24 pkgsrc-2012Q2-base:1.1 pkgsrc-2012Q1:1.1.0.22 pkgsrc-2012Q1-base:1.1 pkgsrc-2011Q4:1.1.0.20 pkgsrc-2011Q4-base:1.1 pkgsrc-2011Q3:1.1.0.18 pkgsrc-2011Q3-base:1.1 pkgsrc-2011Q2:1.1.0.16 pkgsrc-2011Q2-base:1.1 pkgsrc-2011Q1:1.1.0.14 pkgsrc-2011Q1-base:1.1 pkgsrc-2010Q4:1.1.0.12 pkgsrc-2010Q4-base:1.1 pkgsrc-2010Q3:1.1.0.10 pkgsrc-2010Q3-base:1.1 pkgsrc-2010Q2:1.1.0.8 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.6 pkgsrc-2010Q1-base:1.1 pkgsrc-2009Q4:1.1.0.4 pkgsrc-2009Q4-base:1.1 pkgsrc-2009Q3:1.1.0.2 pkgsrc-2009Q3-base:1.1; locks; strict; comment @# @; 1.2 date 2022.01.22.18.41.21; author pho; state Exp; branches; next 1.1; commitid NFiiP3qZsLpH1FpD; 1.1 date 2009.08.03.13.50.39; author joerg; state Exp; branches; next ; desc @@ 1.2 log @Conditionalise workarounds for old NetBSD librefuse @ text @$NetBSD: patch-aa,v 1.1 2009/08/03 13:50:39 joerg Exp $ Hunk #0: Be explicit about the API version it wants to use. Hunk #1, #2, #3, #5: httpfs performs a weird hack that obtains a reference to the directory it is going to be mounted on, and then tries to call statvfs(2) and opendir(3) on that directory in respective filesystem callbacks. On Linux this can somehow avoid deadlocks it seems (possibly due to the way how Linux vfs is implemented?), but on NetBSD it can't. Don't try to do that. Hunk #4: Workaround for NetBSD librefuse that had an API incompatible with FUSE. Already fixed in HEAD. --- httpfs.c.orig 2006-08-26 06:29:28.000000000 +0000 +++ httpfs.c @@@@ -1,3 +1,5 @@@@ +#define FUSE_USE_VERSION 25 + /* * HTTPFS: import a file from a web server to local file system * the main use is, to mount an iso on a web server with loop device @@@@ -550,6 +552,9 @@@@ static int httpfs_readlink(const char *p static int httpfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi) { +#if defined(__NetBSD__) + filler(buf, httpfs_path + 1, NULL, 0); +#else DIR *dp; struct dirent *de; (void) offset; @@@@ -574,6 +579,7 @@@@ static int httpfs_readdir(const char *pa } closedir(dp); +#endif return 0; } @@@@ -778,11 +784,15 @@@@ static int httpfs_statfs(const char *pat int res; (void) path; +#if defined(__NetBSD__) + return -ENOSYS; +#else res = statvfs(".", stbuf); if (res == -1) return -errno; return 0; +#endif } static int httpfs_release(const char *path, struct fuse_file_info *fi) { @@@@ -802,7 +812,11 @@@@ static int httpfs_fsync(const char *path return 0; } +#if defined(__NetBSD__) && FUSE_H_ < 20211204 +static void *httpfs_init(struct fuse_conn_info *conn) { +#else static void *httpfs_init(void) { +#endif fchdir(targetFd); /* that's the catch */ return NULL; } @@@@ -924,11 +938,15 @@@@ int main(int argc, char *argv[]) { (void) fprintf(stderr, "%s: %s is not a directory\n", argv0, argv2); return 1; } - + +#if defined(__NetBSD__) + targetFd = open("/", 0); /* Unused */ +#else if ((targetFd = open(argv2, 0)) == -1) { (void) fprintf(stderr, "%s: open %s failed\n", argv0, argv2); return 1; } +#endif ri = rindex(file_name, '/'); if (ri == (char *) 0) { @ 1.1 log @Try to make it compilable on NetBSD. @ text @d1 1 a1 1 $NetBSD$ d3 16 a18 1 --- httpfs.c.orig 2009-08-03 15:46:22.000000000 +0200 d26 29 a54 1 @@@@ -802,7 +804,7 @@@@ static int httpfs_fsync(const char *path d56 1 d59 10 a68 2 -static void *httpfs_init(void) { +static void *httpfs_init(struct fuse_conn_info *arg) { d72 17 @