logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 56f9e5e45fa33a8819a0b539f2afde804ba27279
parent a77ed8efe01a1d328d9cc409ed1f2cc2d90c7452
Author: Michael Forney <mforney@mforney.org>
Date:   Mon, 17 Jun 2019 23:23:02 -0700

fuse: Fix a few portability issues

Diffstat:

Apkg/fuse/patch/0001-Fix-build-with-IGNORE_MTAB-425.patch34++++++++++++++++++++++++++++++++++
Dpkg/fuse/patch/0001-Fix-build-with-IGNORE_MTAB.patch32--------------------------------
Apkg/fuse/patch/0002-Only-use-versioned-symbols-on-GNU-compatible-compile.patch25+++++++++++++++++++++++++
Apkg/fuse/patch/0003-Remove-extra-when-symbol-versions-are-disabled.patch89+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/fuse/patch/0004-Avoid-statement-expressions-in-container_of-macro.patch45+++++++++++++++++++++++++++++++++++++++++++++
Mpkg/fuse/ver2+-
6 files changed, 194 insertions(+), 33 deletions(-)

diff --git a/pkg/fuse/patch/0001-Fix-build-with-IGNORE_MTAB-425.patch b/pkg/fuse/patch/0001-Fix-build-with-IGNORE_MTAB-425.patch @@ -0,0 +1,34 @@ +From f0c52798b761280583379ba267b0ecc1ea34bbfc Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sat, 15 Jun 2019 03:16:45 -0700 +Subject: [PATCH] Fix build with IGNORE_MTAB (#425) + +chdir_to_parent and check_is_mount are used by should_auto_mount, added +in fuse-3.3.0, regardless of whether IGNORE_MTAB is defined. +--- + util/fusermount.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/util/fusermount.c b/util/fusermount.c +index 5e0b104..56da6ec 100644 +--- a/util/fusermount.c ++++ b/util/fusermount.c +@@ -208,6 +208,7 @@ static int may_unmount(const char *mnt, int quiet) + + return 0; + } ++#endif + + /* + * Check whether the file specified in "fusermount3 -u" is really a +@@ -395,6 +396,7 @@ static int chdir_to_parent(char *copy, const char **lastp) + return 0; + } + ++#ifndef IGNORE_MTAB + /* Check whether the kernel supports UMOUNT_NOFOLLOW flag */ + static int umount_nofollow_support(void) + { +-- +2.20.1 + diff --git a/pkg/fuse/patch/0001-Fix-build-with-IGNORE_MTAB.patch b/pkg/fuse/patch/0001-Fix-build-with-IGNORE_MTAB.patch @@ -1,32 +0,0 @@ -From 0030a024f2dbc438a19e9410e95e02156d1c78db Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Wed, 7 Nov 2018 14:29:38 -0800 -Subject: [PATCH] Fix build with IGNORE_MTAB - ---- - util/fusermount.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/util/fusermount.c b/util/fusermount.c -index 8eb0fdc..2d02a65 100644 ---- a/util/fusermount.c -+++ b/util/fusermount.c -@@ -208,6 +208,7 @@ static int may_unmount(const char *mnt, int quiet) - - return 0; - } -+#endif /* IGNORE_MTAB */ - - /* - * Check whether the file specified in "fusermount3 -u" is really a -@@ -395,6 +396,7 @@ static int chdir_to_parent(char *copy, const char **lastp) - return 0; - } - -+#ifndef IGNORE_MTAB - /* Check whether the kernel supports UMOUNT_NOFOLLOW flag */ - static int umount_nofollow_support(void) - { --- -2.19.1 - diff --git a/pkg/fuse/patch/0002-Only-use-versioned-symbols-on-GNU-compatible-compile.patch b/pkg/fuse/patch/0002-Only-use-versioned-symbols-on-GNU-compatible-compile.patch @@ -0,0 +1,25 @@ +From f065c341a270233b563d54c75dc13ecd7c430938 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Mon, 17 Jun 2019 23:15:08 -0700 +Subject: [PATCH] Only use versioned symbols on GNU-compatible compilers + +--- + lib/fuse_misc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/fuse_misc.h b/lib/fuse_misc.h +index 2f6663e..d4b82e6 100644 +--- a/lib/fuse_misc.h ++++ b/lib/fuse_misc.h +@@ -13,7 +13,7 @@ + - confuse the dynamic linker in uClibc + - not supported on MacOSX (in MachO binary format) + */ +-#if (!defined(__UCLIBC__) && !defined(__APPLE__)) ++#if (!defined(__UCLIBC__) && !defined(__APPLE__)) && defined(__GNUC__) + #define FUSE_SYMVER(x) __asm__(x) + #else + #define FUSE_SYMVER(x) +-- +2.20.1 + diff --git a/pkg/fuse/patch/0003-Remove-extra-when-symbol-versions-are-disabled.patch b/pkg/fuse/patch/0003-Remove-extra-when-symbol-versions-are-disabled.patch @@ -0,0 +1,89 @@ +From e23b765a6419159a50d70eab4f4df6a940af699c Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Mon, 17 Jun 2019 23:17:13 -0700 +Subject: [PATCH] Remove extra ';' when symbol versions are disabled + +--- + lib/fuse.c | 8 ++++---- + lib/fuse_loop_mt.c | 4 ++-- + lib/fuse_misc.h | 2 +- + 3 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/lib/fuse.c b/lib/fuse.c +index ec6cc59..e75efcd 100755 +--- a/lib/fuse.c ++++ b/lib/fuse.c +@@ -4525,7 +4525,7 @@ int fuse_loop(struct fuse *f) + return fuse_session_loop(f->se); + } + +-FUSE_SYMVER(".symver fuse_loop_mt_32,fuse_loop_mt@@FUSE_3.2"); ++FUSE_SYMVER(".symver fuse_loop_mt_32,fuse_loop_mt@@FUSE_3.2") + int fuse_loop_mt_32(struct fuse *f, struct fuse_loop_config *config) + { + if (f == NULL) +@@ -4541,7 +4541,7 @@ int fuse_loop_mt_32(struct fuse *f, struct fuse_loop_config *config) + } + + int fuse_loop_mt_31(struct fuse *f, int clone_fd); +-FUSE_SYMVER(".symver fuse_loop_mt_31,fuse_loop_mt@FUSE_3.0"); ++FUSE_SYMVER(".symver fuse_loop_mt_31,fuse_loop_mt@FUSE_3.0") + int fuse_loop_mt_31(struct fuse *f, int clone_fd) + { + struct fuse_loop_config config; +@@ -4826,7 +4826,7 @@ void fuse_stop_cleanup_thread(struct fuse *f) + } + + +-FUSE_SYMVER(".symver fuse_new_31,fuse_new@@FUSE_3.1"); ++FUSE_SYMVER(".symver fuse_new_31,fuse_new@@FUSE_3.1") + struct fuse *fuse_new_31(struct fuse_args *args, + const struct fuse_operations *op, + size_t op_size, void *user_data) +@@ -4980,7 +4980,7 @@ out: + /* Emulates 3.0-style fuse_new(), which processes --help */ + struct fuse *fuse_new_30(struct fuse_args *args, const struct fuse_operations *op, + size_t op_size, void *private_data); +-FUSE_SYMVER(".symver fuse_new_30,fuse_new@FUSE_3.0"); ++FUSE_SYMVER(".symver fuse_new_30,fuse_new@FUSE_3.0") + struct fuse *fuse_new_30(struct fuse_args *args, + const struct fuse_operations *op, + size_t op_size, void *user_data) +diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c +index 83f1641..753a6e9 100644 +--- a/lib/fuse_loop_mt.c ++++ b/lib/fuse_loop_mt.c +@@ -304,7 +304,7 @@ static void fuse_join_worker(struct fuse_mt *mt, struct fuse_worker *w) + free(w); + } + +-FUSE_SYMVER(".symver fuse_session_loop_mt_32,fuse_session_loop_mt@@FUSE_3.2"); ++FUSE_SYMVER(".symver fuse_session_loop_mt_32,fuse_session_loop_mt@@FUSE_3.2") + int fuse_session_loop_mt_32(struct fuse_session *se, struct fuse_loop_config *config) + { + int err; +@@ -352,7 +352,7 @@ int fuse_session_loop_mt_32(struct fuse_session *se, struct fuse_loop_config *co + } + + int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd); +-FUSE_SYMVER(".symver fuse_session_loop_mt_31,fuse_session_loop_mt@FUSE_3.0"); ++FUSE_SYMVER(".symver fuse_session_loop_mt_31,fuse_session_loop_mt@FUSE_3.0") + int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd) + { + struct fuse_loop_config config; +diff --git a/lib/fuse_misc.h b/lib/fuse_misc.h +index d4b82e6..cdb1850 100644 +--- a/lib/fuse_misc.h ++++ b/lib/fuse_misc.h +@@ -14,7 +14,7 @@ + - not supported on MacOSX (in MachO binary format) + */ + #if (!defined(__UCLIBC__) && !defined(__APPLE__)) && defined(__GNUC__) +-#define FUSE_SYMVER(x) __asm__(x) ++#define FUSE_SYMVER(x) __asm__(x); + #else + #define FUSE_SYMVER(x) + #endif +-- +2.20.1 + diff --git a/pkg/fuse/patch/0004-Avoid-statement-expressions-in-container_of-macro.patch b/pkg/fuse/patch/0004-Avoid-statement-expressions-in-container_of-macro.patch @@ -0,0 +1,45 @@ +From 9883408010640daaabd57934e5e4211f48d50362 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Mon, 17 Jun 2019 23:21:39 -0700 +Subject: [PATCH] Avoid statement expressions in container_of macro + +--- + lib/fuse.c | 5 ++--- + lib/fuse_lowlevel.c | 5 ++--- + 2 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/lib/fuse.c b/lib/fuse.c +index e75efcd..d8859ab 100755 +--- a/lib/fuse.c ++++ b/lib/fuse.c +@@ -93,9 +93,8 @@ struct node_table { + size_t split; + }; + +-#define container_of(ptr, type, member) ({ \ +- const typeof( ((type *)0)->member ) *__mptr = (ptr); \ +- (type *)( (char *)__mptr - offsetof(type,member) );}) ++#define container_of(ptr, type, member) \ ++ ((type *)((char *)ptr - offsetof(type,member))) + + #define list_entry(ptr, type, member) \ + container_of(ptr, type, member) +diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c +index 3684b8b..b9a488c 100644 +--- a/lib/fuse_lowlevel.c ++++ b/lib/fuse_lowlevel.c +@@ -39,9 +39,8 @@ + #define PARAM(inarg) (((char *)(inarg)) + sizeof(*(inarg))) + #define OFFSET_MAX 0x7fffffffffffffffLL + +-#define container_of(ptr, type, member) ({ \ +- const typeof( ((type *)0)->member ) *__mptr = (ptr); \ +- (type *)( (char *)__mptr - offsetof(type,member) );}) ++#define container_of(ptr, type, member) \ ++ ((type *)((char *)ptr - offsetof(type,member))) + + struct fuse_pollhandle { + uint64_t kh; +-- +2.20.1 + diff --git a/pkg/fuse/ver b/pkg/fuse/ver @@ -1 +1 @@ -3.6.1 r0 +3.6.1 r1