new file mode 100644
@@ -0,0 +1,89 @@
+From d2face15092e87450dc93201d5622451e73e0928 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Thu, 8 Sep 2022 23:37:19 +0200
+Subject: [PATCH] Fix build failure with uclibc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Building with uclibc leads to failure:
+```
+FAILED: lib/libfuse3.so.3.12.0.p/helper.c.o.
+/home/giuliobenetti/git/upstream/test-libfuse3/bootlin-armv5-uclibc/host/bin/arm-linux-gcc -Ilib/libf
+In file included from ../lib/fuse_i.h:10,
+ from ../lib/helper.c:14:
+../include/fuse_lowlevel.h:1921:40: error: redefinition of ‘fuse_parse_cmdline_312’
+ 1921 | #define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_312(args, opts)
+ | ^~~~~~~~~~~~~~~~~~~~~~
+../lib/helper.c:258:5: note: in expansion of macro ‘fuse_parse_cmdline’
+ 258 | int fuse_parse_cmdline(struct fuse_args *args,
+ | ^~~~~~~~~~~~~~~~~~
+../lib/helper.c:208:5: note: previous definition of ‘fuse_parse_cmdline_312’ was here
+ 208 | int fuse_parse_cmdline_312(struct fuse_args *args,
+```
+This happens because uclibc, depending on version, can support symver, so
+if symver is supported and uclibc is used function fuse_parse_cmdline_312()
+will be defined twice:
+1. the function itself with symver
+2. fuse_parse_cmdline() as the #define of fuse_parse_cmdline_312() and its
+prototype
+This leads to have the redefinition of ‘fuse_parse_cmdline_312’.
+
+To solve this let's move all the checks of FUSE_USE_VERSION to helper.c
+file from fuse_lowlevel.h exposing only fuse_parse_cmdline().
+
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ include/fuse_lowlevel.h | 12 ------------
+ lib/helper.c | 7 +++++--
+ 2 files changed, 5 insertions(+), 14 deletions(-)
+
+diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
+index 53f0fcf..3e43efc 100644
+--- a/include/fuse_lowlevel.h
++++ b/include/fuse_lowlevel.h
+@@ -1907,20 +1907,8 @@ struct fuse_cmdline_opts {
+ * @param opts output argument for parsed options
+ * @return 0 on success, -1 on failure
+ */
+-#if (!defined(__UCLIBC__) && !defined(__APPLE__))
+ int fuse_parse_cmdline(struct fuse_args *args,
+ struct fuse_cmdline_opts *opts);
+-#else
+-#if FUSE_USE_VERSION < FUSE_MAKE_VERSION(3, 12)
+-int fuse_parse_cmdline_30(struct fuse_args *args,
+- struct fuse_cmdline_opts *opts);
+-#define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_30(args, opts)
+-#else
+-int fuse_parse_cmdline_312(struct fuse_args *args,
+- struct fuse_cmdline_opts *opts);
+-#define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_312(args, opts)
+-#endif
+-#endif
+
+ /**
+ * Create a low level session.
+diff --git a/lib/helper.c b/lib/helper.c
+index 84013b9..c610920 100644
+--- a/lib/helper.c
++++ b/lib/helper.c
+@@ -258,11 +258,14 @@ int fuse_parse_cmdline_30(struct fuse_args *args,
+ int fuse_parse_cmdline(struct fuse_args *args,
+ struct fuse_cmdline_opts *opts)
+ {
+- return fuse_parse_cmdline_30(args, out_opts);
++#if FUSE_USE_VERSION < FUSE_MAKE_VERSION(3, 12)
++ return fuse_parse_cmdline_30(args, opts);
++#else
++ return fuse_parse_cmdline_312(args, opts);
++#endif
+ }
+ #endif
+
+-
+ int fuse_daemonize(int foreground)
+ {
+ if (!foreground) {
+--
+2.34.1
+
@@ -1,3 +1,3 @@
# Locally calculated sha256 checksums
-sha256 25a00226d2d449c15b2f08467d6d5ebbb2a428260c4ab773721c32adbc6da072 libfuse3-3.11.0.tar.gz
+sha256 df6cc8807c4fd36b6b0ebef2b738dad6d19a9c7c085ccc3775063688d0bfcc0b libfuse3-3.12.0.tar.gz
sha256 b8832d9caaa075bbbd2aef24efa09f8b7ab66a832812d88c602da0c7b4397fad LICENSE
@@ -4,7 +4,7 @@
#
################################################################################
-LIBFUSE3_VERSION = 3.11.0
+LIBFUSE3_VERSION = 3.12.0
LIBFUSE3_SITE = $(call github,libfuse,libfuse,fuse-$(LIBFUSE3_VERSION))
LIBFUSE3_LICENSE = LGPL-2.1
LIBFUSE3_LICENSE_FILES = LICENSE
This new version needs a patch to deal with a build failure when SYMVER is not available. As described in the patch itself there is a #define in low_level.h header that is included in helper.c; that defines twice the same function because: in low_level.h: ``` int fuse_parse_cmdline_312(struct fuse_args *args, struct fuse_cmdline_opts *opts); ``` While in helper.c: ``` int fuse_parse_cmdline_312(struct fuse_args *args, struct fuse_cmdline_opts *opts) { .... } int fuse_parse_cmdline(struct fuse_args *args, struct fuse_cmdline_opts *opts) { .... } ``` and: makes helper.c expands to: ``` int fuse_parse_cmdline_312(struct fuse_args *args, struct fuse_cmdline_opts *opts) { .... } int fuse_parse_cmdline_312(struct fuse_args *args, struct fuse_cmdline_opts *opts) { .... } ``` though fuse_parse_cmdline_312() defined twice. To fix this patch moves all the checking for FUSE_MAKE_VERSION into helper.c and doesn't redirect fuse_parse_cmdline() using #define in low_level.h. Patch is pending upstream: https://github.com/libfuse/libfuse/pull/698 Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> --- V1->V2: * fixed patch by not relying on HAVE_SYMVER_ATTRIBUTE since this is mandatory to fix the bug. It's something that can improve symver usage in case uclibc is used as libc. --- .../0001-Fix-build-failure-with-uclibc.patch | 89 +++++++++++++++++++ package/libfuse3/libfuse3.hash | 2 +- package/libfuse3/libfuse3.mk | 2 +- 3 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 package/libfuse3/0001-Fix-build-failure-with-uclibc.patch