summaryrefslogtreecommitdiff
path: root/filesystems/ltfs/patches/patch-src_ltfs_fuse.c
diff options
context:
space:
mode:
authormanu <manu@pkgsrc.org>2022-03-24 16:35:31 +0000
committermanu <manu@pkgsrc.org>2022-03-24 16:35:31 +0000
commit7af2f5a8f11352c4eb589f13430bed6b2ed3e3ba (patch)
tree4ba7956689d693e8bc4fb6005ee0630aa0970200 /filesystems/ltfs/patches/patch-src_ltfs_fuse.c
parent92dc407d22c561f8c3dcf4ff641a30ca8659517a (diff)
downloadpkgsrc-7af2f5a8f11352c4eb589f13430bed6b2ed3e3ba.tar.gz
dd missing patch (Hi Thomas!)
Diffstat (limited to 'filesystems/ltfs/patches/patch-src_ltfs_fuse.c')
-rw-r--r--filesystems/ltfs/patches/patch-src_ltfs_fuse.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/filesystems/ltfs/patches/patch-src_ltfs_fuse.c b/filesystems/ltfs/patches/patch-src_ltfs_fuse.c
new file mode 100644
index 00000000000..55c6e4b7c2b
--- /dev/null
+++ b/filesystems/ltfs/patches/patch-src_ltfs_fuse.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_ltfs_fuse.c,v 1.1 2022/03/24 16:35:31 manu Exp $
+
+Do not take for granted that __WORDSIZE is defined to distinguish
+between 32 and 64 bit platforms. Instead use ULONG_MAX from <limits.h>
+which is mandared by ISO C99.
+
+--- src/ltfs_fuse.c.orig 2022-03-24 10:08:47.455171288 +0100
++++ src/ltfs_fuse.c 2022-03-24 10:21:27.627832669 +0100
+@@ -53,8 +53,11 @@
+ ** piste@jp.ibm.com
+ **
+ *************************************************************************************
+ */
++
++#include <limits.h> /* for ULONG_MAX */
++
+ #include "ltfs_fuse.h"
+ #include "libltfs/ltfs_fsops.h"
+ #include "libltfs/iosched.h"
+ #include "libltfs/pathname.h"
+@@ -67,9 +70,9 @@
+ #ifdef mingw_PLATFORM
+ #include "libltfs/arch/win/win_util.h"
+ #endif
+
+-#if (__WORDSIZE == 64)
++#if (__WORDSIZE == 64 || ULONG_MAX == 0xffffffffffffffffUL)
+ #define FILEHANDLE_TO_STRUCT(fh) ((struct ltfs_file_handle *)(uint64_t)(fh))
+ #define STRUCT_TO_FILEHANDLE(de) ((uint64_t)(de))
+ #else
+ #define FILEHANDLE_TO_STRUCT(fh) ((struct ltfs_file_handle *)(uint32_t)(fh))