diff options
Diffstat (limited to 'main/xfsprogs/musl-fixes.patch')
-rw-r--r-- | main/xfsprogs/musl-fixes.patch | 130 |
1 files changed, 51 insertions, 79 deletions
diff --git a/main/xfsprogs/musl-fixes.patch b/main/xfsprogs/musl-fixes.patch index bffa6fb60d..6fe69a11bf 100644 --- a/main/xfsprogs/musl-fixes.patch +++ b/main/xfsprogs/musl-fixes.patch @@ -13,81 +13,15 @@ index 6f00b41..5b4af53 100644 char *progname; -diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in -index ac260bc..0e7fccf 100644 ---- a/include/platform_defs.h.in -+++ b/include/platform_defs.h.in -@@ -68,6 +68,32 @@ typedef __u64 __bitwise __be64; - - typedef struct filldir filldir_t; - -+#ifndef __uint8_t -+#define __uint8_t uint8_t -+#endif -+#ifndef __uint16_t -+#define __uint16_t uint16_t -+#endif -+#ifndef __uint32_t -+#define __uint32_t uint32_t -+#endif -+#ifndef __uint64_t -+#define __uint64_t uint64_t -+#endif -+ -+#ifndef __int8_t -+#define __int8_t int8_t -+#endif -+#ifndef __int16_t -+#define __int16_t int16_t -+#endif -+#ifndef __int32_t -+#define __int32_t int32_t -+#endif -+#ifndef __int64_t -+#define __int64_t int64_t -+#endif -+ - #if defined(__linux__) - #include <xfs/linux.h> - #elif defined(__FreeBSD__) -diff --git a/libhandle/handle.c b/libhandle/handle.c -index 9a232fa..1db7772 100644 ---- a/libhandle/handle.c -+++ b/libhandle/handle.c -@@ -20,6 +20,9 @@ - #include <xfs/xfs.h> - #include <xfs/handle.h> - #include <xfs/parent.h> -+#if defined(__linux__) -+#include <linux/limits.h> -+#endif - - /* just pick a value we know is more than big enough */ - #define MAXHANSIZ 64 -diff --git a/libhandle/jdm.c b/libhandle/jdm.c -index 070407b..8dd6322 100644 ---- a/libhandle/jdm.c -+++ b/libhandle/jdm.c -@@ -20,6 +20,9 @@ - #include <xfs/handle.h> - #include <xfs/jdm.h> - #include <xfs/parent.h> -+#if defined(__linux__) -+#include <linux/limits.h> -+#endif - - /* internal fshandle - typecast to a void for external use */ - #define FSHANDLE_SZ 8 diff --git a/libxfs/linux.c b/libxfs/linux.c index 2e07d54..4075786 100644 --- a/libxfs/linux.c +++ b/libxfs/linux.c -@@ -16,12 +16,9 @@ +@@ -16,11 +16,8 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#define ustat __kernel_ustat - #include <xfs/libxfs.h> #include <mntent.h> #include <sys/stat.h> -#undef ustat @@ -95,7 +29,7 @@ index 2e07d54..4075786 100644 #include <sys/mount.h> #include <sys/ioctl.h> #include <sys/sysinfo.h> -@@ -49,9 +46,12 @@ static int max_block_alignment; +@@ -51,9 +48,12 @@ int platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) { @@ -110,7 +44,7 @@ index 2e07d54..4075786 100644 if (!s) { if (stat64(block, &st) < 0) -@@ -61,14 +61,25 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) +@@ -63,14 +63,25 @@ s = &st; } @@ -139,16 +73,54 @@ index 2e07d54..4075786 100644 } int ---- ./repair/attr_repair.c.orig -+++ ./repair/attr_repair.c -@@ -24,6 +24,10 @@ - #include "bmap.h" - #include "protos.h" - #include "dir2.h" -+#if defined(__linux__) -+#include <linux/limits.h> +--- old/io/readdir.c ++++ new/io/readdir.c +@@ -23,6 +23,9 @@ + + #include <sys/types.h> + #include <dirent.h> ++#define _DIRENT_HAVE_D_OFF ++#define _DIRENT_HAVE_D_RECLEN ++#define _DIRENT_HAVE_D_TYPE + + static struct cmdinfo readdir_cmd; + +--- old/include/linux.h ++++ new/include/linux.h +@@ -31,6 +31,36 @@ + #include <stdbool.h> + #include <asm/types.h> + #include <mntent.h> ++#include <stdio.h> ++ ++#ifndef loff_t ++#define loff_t off_t ++#endif ++#ifndef __uint8_t ++#define __uint8_t uint8_t ++#endif ++#ifndef __uint16_t ++#define __uint16_t uint16_t ++#endif ++#ifndef __uint32_t ++#define __uint32_t uint32_t ++#endif ++#ifndef __uint64_t ++#define __uint64_t uint64_t +#endif + ++#ifndef __int8_t ++#define __int8_t int8_t ++#endif ++#ifndef __int16_t ++#define __int16_t int16_t ++#endif ++#ifndef __int32_t ++#define __int32_t int32_t ++#endif ++#ifndef __int64_t ++#define __int64_t int64_t ++#endif - static int xfs_acl_valid(struct xfs_mount *mp, struct xfs_acl *daclp); - static int xfs_mac_valid(xfs_mac_label_t *lp); + static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p) + { |