--- /dev/null
+--- djmount-0.71/libupnp/threadutil/inc/ithread.h
++++ djmount-0.71/libupnp/threadutil/inc/ithread.h
+@@ -179,7 +179,7 @@
+ * Returns EINVAL if the kind is not supported.
+ * See man page for pthread_mutexattr_setkind_np
+ *****************************************************************************/
+-#define ithread_mutexattr_setkind_np pthread_mutexattr_setkind_np
++#define ithread_mutexattr_setkind_np pthread_mutexattr_settype
+
+
+ /****************************************************************************
+
--- /dev/null
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Mon, 9 Aug 2010 12:10:40 +0400
+Subject: [PATCH] More parentheses
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/lib/fuse.c b/lib/fuse.c
+index d1d873a..ca1709c 100644
+--- a/lib/fuse.c
++++ b/lib/fuse.c
+@@ -1529,17 +1529,15 @@ static int fuse_compat_open(struct fuse_fs *fs, const char *path,
+ {
+ int err;
+ if (!fs->compat || fs->compat >= 25)
+- err = fs->op.open(path, fi);
++ err = (fs->op.open)(path, fi);
+ else if (fs->compat == 22) {
+ struct fuse_file_info_compat tmp;
+ memcpy(&tmp, fi, sizeof(tmp));
+- err = ((struct fuse_operations_compat22 *) &fs->op)->open(path,
+- &tmp);
++ err = (((struct fuse_operations_compat22 *) &fs->op)->open)(path, &tmp);
+ memcpy(fi, &tmp, sizeof(tmp));
+ fi->fh = tmp.fh;
+ } else
+- err = ((struct fuse_operations_compat2 *) &fs->op)
+- ->open(path, fi->flags);
++ err = (((struct fuse_operations_compat2 *) &fs->op)->open)(path, fi->flags);
+ return err;
+ }
+
+diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
+index ff03c63..255f733 100644
+--- a/lib/fuse_lowlevel.c
++++ b/lib/fuse_lowlevel.c
+@@ -1211,7 +1211,7 @@ static void do_open(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
+ fi.flags = arg->flags;
+
+ if (req->f->op.open)
+- req->f->op.open(req, nodeid, &fi);
++ (req->f->op.open)(req, nodeid, &fi);
+ else
+ fuse_reply_open(req, &fi);
+ }
--- /dev/null
+From: Tom Callaway <spot@fedoraproject.org>
+Date: Wed, 26 Jun 2013 09:34:52 -0400
+Subject: [PATCH] add fix for namespace conflict in fuse_kernel.h
+
+https://bugzilla.redhat.com/show_bug.cgi?id=970768
+
+diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
+index c632b58..9e02fe3 100644
+--- a/include/fuse_kernel.h
++++ b/include/fuse_kernel.h
+@@ -88,12 +88,16 @@
+ #ifndef _LINUX_FUSE_H
+ #define _LINUX_FUSE_H
+
+-#include <sys/types.h>
++#ifdef __linux__
++#include <linux/types.h>
++#else
++#include <stdint.h>
+ #define __u64 uint64_t
+ #define __s64 int64_t
+ #define __u32 uint32_t
+ #define __s32 int32_t
+ #define __u16 uint16_t
++#endif
+
+ /*
+ * Version negotiation:
--- /dev/null
+From: Carlos Maiolino <cmaiolino-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+Date: Thu, 20 Apr 2017 14:53:01 +0200
+Subject: [PATCH] make buffer size match kernel max transfer size
+
+Currently libfuse has a hardcoded buffer limit to 128kib, while fuse
+kernel module has a limit up to 32 pages.
+
+This patch changes buffer limit to match the current page size, instead
+of assuming 4096 bytes pages, enabling architectures with bigger pages
+to use larger buffers, improving performance.
+
+Also, add a new macro (HEADER_SIZE) to specify the space needed to
+accommodate the header, making it easier to understand why those extra
+4096 bytes are needed
+
+Signed-off-by: Carlos Maiolino <cmaiolino-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+
+diff --git a/lib/fuse_kern_chan.c b/lib/fuse_kern_chan.c
+index 4a9beb8..640b91a 100644
+--- a/lib/fuse_kern_chan.c
++++ b/lib/fuse_kern_chan.c
+@@ -83,7 +83,10 @@ static void fuse_kern_chan_destroy(struct fuse_chan *ch)
+ close(fd);
+ }
+
+-#define MIN_BUFSIZE 0x21000
++#define KERNEL_BUF_PAGES 32
++
++/* room needed in buffer to accommodate header */
++#define HEADER_SIZE 0x1000
+
+ struct fuse_chan *fuse_kern_chan_new(int fd)
+ {
+@@ -92,7 +95,6 @@ struct fuse_chan *fuse_kern_chan_new(int fd)
+ .send = fuse_kern_chan_send,
+ .destroy = fuse_kern_chan_destroy,
+ };
+- size_t bufsize = getpagesize() + 0x1000;
+- bufsize = bufsize < MIN_BUFSIZE ? MIN_BUFSIZE : bufsize;
++ size_t bufsize = KERNEL_BUF_PAGES * getpagesize() + HEADER_SIZE;
+ return fuse_chan_new(&op, fd, bufsize, NULL);
+ }
--- /dev/null
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Wed, 3 Apr 2019 12:23:56 +0300
+Subject: [PATCH] Whitelist SMB2 found on some NAS devices
+
+* https://bugzilla.redhat.com/1694552#c7
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/util/fusermount.c b/util/fusermount.c
+index 4b799d9..ef9d1ed 100644
+--- a/util/fusermount.c
++++ b/util/fusermount.c
+@@ -1046,6 +1046,7 @@ static int check_perm(const char **mntp, struct stat *stbuf, int *mountpoint_fd)
+ 0x5346544E /* NTFS_SB_MAGIC */,
+ 0x794C7630 /* OVERLAYFS_SUPER_MAGIC */,
+ 0x52654973 /* REISERFS_SUPER_MAGIC */,
++ 0xFE534D42 /* SMB2_SUPER_MAGIC */,
+ 0x73717368 /* SQUASHFS_MAGIC */,
+ 0x01021994 /* TMPFS_MAGIC */,
+ 0x24051905 /* UBIFS_SUPER_MAGIC */,
--- /dev/null
+From: tenzap <46226844+tenzap@users.noreply.github.com>
+Date: Sun, 15 Sep 2019 17:57:08 +0200
+Subject: [PATCH] Whitelist UFSD (backport to 2.9 branch) (#452)
+
+
+diff --git a/ChangeLog b/ChangeLog
+index 13a369f..5574f20 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,9 @@
++Unreleased Changes
++==================
++
++* Added UFSD to whitelist (so users can now mount FUSE filesystems
++ on mountpoints within UFSD filesystems).
++
+ FUSE 2.9.9 (2019-01-04)
+ =======================
+
+diff --git a/util/fusermount.c b/util/fusermount.c
+index ef9d1ed..63a69dc 100644
+--- a/util/fusermount.c
++++ b/util/fusermount.c
+@@ -1050,6 +1050,7 @@ static int check_perm(const char **mntp, struct stat *stbuf, int *mountpoint_fd)
+ 0x73717368 /* SQUASHFS_MAGIC */,
+ 0x01021994 /* TMPFS_MAGIC */,
+ 0x24051905 /* UBIFS_SUPER_MAGIC */,
++ 0x736675005346544e /* UFSD */,
+ 0x58465342 /* XFS_SB_MAGIC */,
+ 0x2FC12FC1 /* ZFS_SUPER_MAGIC */,
+ };
--- /dev/null
+From: Andrew Gaul <gaul@google.com>
+Date: Mon, 14 Dec 2020 19:16:05 +0900
+Subject: [PATCH] Correct errno comparison (#571)
+
+
+diff --git a/lib/fuse.c b/lib/fuse.c
+index ca1709c..896aa24 100644
+--- a/lib/fuse.c
++++ b/lib/fuse.c
+@@ -4348,7 +4348,7 @@ static int fuse_session_loop_remember(struct fuse *f)
+
+ res = poll(&fds, 1, timeout * 1000);
+ if (res == -1) {
+- if (errno == -EINTR)
++ if (errno == EINTR)
+ continue;
+ else
+ break;
--- /dev/null
+From: Sam James <sam@gentoo.org>
+Date: Sat, 24 Jul 2021 22:02:45 +0100
+Subject: [PATCH] util/ulockmgr_server.c: conditionally define closefrom (fix
+ glibc-2.34+)
+
+closefrom(3) has joined us in glibc-land from *BSD and Solaris. Since
+it's available in glibc 2.34+, we want to detect it and only define our
+fallback if the libc doesn't provide it.
+
+Bug: https://bugs.gentoo.org/803923
+Signed-off-by: Sam James <sam@gentoo.org>
+
+diff --git a/configure.ac b/configure.ac
+index 9946a0e..a2d481a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,6 +55,7 @@ fi
+
+ AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat])
+ AC_CHECK_FUNCS([posix_fallocate])
++AC_CHECK_FUNCS([closefrom])
+ AC_CHECK_MEMBERS([struct stat.st_atim])
+ AC_CHECK_MEMBERS([struct stat.st_atimespec])
+
+diff --git a/util/ulockmgr_server.c b/util/ulockmgr_server.c
+index 273c7d9..a04dac5 100644
+--- a/util/ulockmgr_server.c
++++ b/util/ulockmgr_server.c
+@@ -22,6 +22,10 @@
+ #include <sys/socket.h>
+ #include <sys/wait.h>
+
++#ifdef HAVE_CONFIG_H
++ #include "config.h"
++#endif
++
+ struct message {
+ unsigned intr : 1;
+ unsigned nofd : 1;
+@@ -124,6 +128,7 @@ static int receive_message(int sock, void *buf, size_t buflen, int *fdp,
+ return res;
+ }
+
++#if !defined(HAVE_CLOSEFROM)
+ static int closefrom(int minfd)
+ {
+ DIR *dir = opendir("/proc/self/fd");
+@@ -141,6 +146,7 @@ static int closefrom(int minfd)
+ }
+ return 0;
+ }
++#endif
+
+ static void send_reply(int cfd, struct message *msg)
+ {