overlay/sys-kernel/recoveryinitramfs/files/xfsprogs/3.1.11/002_all_xfsprogs-3.1.11-musl.patch
2013-10-29 18:26:14 +01:00

151 lines
5.0 KiB
Diff

--- xfsprogs-3.0.0/include/linux.h~ 2009-02-04 23:29:25.000000000 +0100
+++ xfsprogs-3.0.0/include/linux.h 2009-03-19 16:19:35.000000000 +0100
@@ -25,6 +25,10 @@
#include <malloc.h>
#include <getopt.h>
#include <endian.h>
+/* MUSL */
+#include <libgen.h>
+#include <xfs/xfs_types.h>
+/* MUSL */
static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
{
diff -ur xfsprogs-3.0.0/include/project.h xfsprogs-3.0.0-diet/include/project.h
--- xfsprogs-3.0.0/include/project.h 2009-02-04 23:29:25.000000000 +0100
+++ xfsprogs-3.0.0-diet/include/project.h 2009-03-19 12:55:05.000000000 +0100
@@ -19,6 +19,9 @@
#define __PROJECT_H__
#include <xfs/xfs.h>
+/* MUSL */
+#include <xfs/xfs_types.h>
+/* MUSL */
#if !defined(__sgi__)
typedef __uint32_t prid_t;
diff -ur xfsprogs-3.0.0/include/xfs_types.h xfsprogs-3.0.0-diet/include/xfs_types.h
--- xfsprogs-3.0.0/include/xfs_types.h 2009-02-04 23:29:25.000000000 +0100
+++ xfsprogs-3.0.0-diet/include/xfs_types.h 2009-03-19 12:40:08.000000000 +0100
@@ -28,18 +28,6 @@
typedef unsigned int uint_t;
typedef unsigned long ulong_t;
-/*
- * Additional type declarations for XFS
- */
-typedef signed char __int8_t;
-typedef unsigned char __uint8_t;
-typedef signed short int __int16_t;
-typedef unsigned short int __uint16_t;
-typedef signed int __int32_t;
-typedef unsigned int __uint32_t;
-typedef signed long long int __int64_t;
-typedef unsigned long long int __uint64_t;
-
typedef enum { B_FALSE,B_TRUE } boolean_t;
typedef __uint32_t prid_t; /* project ID */
typedef __uint32_t inst_t; /* an instruction */
@@ -64,6 +52,20 @@
#endif /* __KERNEL__ */
+/* MUSL */
+/*
+ * Additional type declarations for XFS
+ */
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+typedef signed long long int __int64_t;
+typedef unsigned long long int __uint64_t;
+/* MUSL */
+
typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */
typedef __uint32_t xfs_extlen_t; /* extent length in blocks */
typedef __uint32_t xfs_agnumber_t; /* allocation group number */
--- xfsprogs-3.0.0/libdisk/evms.h~ 2009-02-04 23:29:25.000000000 +0100
+++ xfsprogs-3.0.0/libdisk/evms.h 2009-03-19 21:52:18.000000000 +0100
@@ -15,6 +15,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+/* MUSL */
+#include <xfs/platform_defs.h>
+/* MUSL */
#define EVMS_MAJOR 117
#define EVMS_GET_VOL_STRIPE_INFO \
diff -ur xfsprogs-3.0.0/libdisk/xvm.h xfsprogs-3.0.0-diet/libdisk/xvm.h
--- xfsprogs-3.0.0/libdisk/xvm.h 2009-02-04 23:29:25.000000000 +0100
+++ xfsprogs-3.0.0-diet/libdisk/xvm.h 2009-03-19 12:56:54.000000000 +0100
@@ -15,6 +15,10 @@
* along with this program; if not, write the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+/* MUSL */
+#include <xfs/platform_defs.h>
+#include <xfs/xfs_types.h>
+/* MUSL */
#define _DIOC_(x) (('d'<<8) | x)
#define DIOCGETVOLDEV _DIOC_(36) /* subvolume devices */
diff -ur xfsprogs-3.0.0/libhandle/handle.c xfsprogs-3.0.0-diet/libhandle/handle.c
--- xfsprogs-3.0.0/libhandle/handle.c 2009-02-04 23:29:25.000000000 +0100
+++ xfsprogs-3.0.0-diet/libhandle/handle.c 2009-03-19 12:56:03.000000000 +0100
@@ -17,6 +17,10 @@
#include <xfs/xfs.h>
#include <xfs/handle.h>
#include <xfs/parent.h>
+/* MUSL */
+#include <xfs/xfs_types.h>
+#include <linux/limits.h>
+/* MUSL */
/* just pick a value we know is more than big enough */
#define MAXHANSIZ 64
diff -ur xfsprogs-3.0.0/libhandle/jdm.c xfsprogs-3.0.0-diet/libhandle/jdm.c
--- xfsprogs-3.0.0/libhandle/jdm.c 2009-02-04 23:29:25.000000000 +0100
+++ xfsprogs-3.0.0-diet/libhandle/jdm.c 2009-03-19 12:56:28.000000000 +0100
@@ -17,6 +17,10 @@
#include <xfs/handle.h>
#include <xfs/jdm.h>
#include <xfs/parent.h>
+/* MUSL */
+#include <xfs/xfs_types.h>
+#include <linux/limits.h>
+/* MUSL */
/* internal fshandle - typecast to a void for external use */
#define FSHANDLE_SZ 8
diff -uNr xfsprogs-3.1.11.orig/libdisk/fstype.h xfsprogs-3.1.11/libdisk/fstype.h
--- xfsprogs-3.1.11.orig/libdisk/fstype.h 2013-10-27 16:58:06.886952140 +0100
+++ xfsprogs-3.1.11/libdisk/fstype.h 2013-10-27 16:58:48.249435038 +0100
@@ -192,7 +192,7 @@
char s_dummy2[62];
char s_checksum[1];
};
-#define adfsblksize(s) ((uint) s.s_blksize[0])
+#define adfsblksize(s) ((unsigned int) s.s_blksize[0])
/* found in first 4 bytes of block 1 */
struct vxfs_super_block {
diff -uNr xfsprogs-3.1.11.orig/fsr/xfs_fsr.c xfsprogs-3.1.11/fsr/xfs_fsr.c
--- xfsprogs-3.1.11.orig/fsr/xfs_fsr.c 2013-10-27 17:23:03.447242562 +0100
+++ xfsprogs-3.1.11/fsr/xfs_fsr.c 2013-10-27 17:23:47.737688855 +0100
@@ -45,6 +45,11 @@
#define _PATH_FSRLAST "/var/tmp/.fsrlast_xfs"
#define _PATH_PROC_MOUNTS "/proc/mounts"
+#ifndef _PATH_MOUNTED
+#ifdef MOUNTED
+#define _PATH_MOUNTED MOUNTED
+#endif
+#endif
char *progname;