aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-06-09 13:47:44 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-06-09 13:47:44 +0000
commit4ebb5e22683b1e5f456ac08451fd58f16e435641 (patch)
treea6d53dbd16829486483dcebfe262d27e1117ffe2 /package/utils
parent59fdd2eedfd9046f495a72d319006a94f168de66 (diff)
downloadmaster-187ad058-4ebb5e22683b1e5f456ac08451fd58f16e435641.tar.gz
master-187ad058-4ebb5e22683b1e5f456ac08451fd58f16e435641.tar.bz2
master-187ad058-4ebb5e22683b1e5f456ac08451fd58f16e435641.zip
xfsprogs: fix compile errors with musl
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41058 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/utils')
-rw-r--r--package/utils/xfsprogs/patches/110-uclibc_no_ustat.patch8
-rw-r--r--package/utils/xfsprogs/patches/130-uclibc_no_xattr.patch8
-rw-r--r--package/utils/xfsprogs/patches/150-include_fixes.patch72
3 files changed, 78 insertions, 10 deletions
diff --git a/package/utils/xfsprogs/patches/110-uclibc_no_ustat.patch b/package/utils/xfsprogs/patches/110-uclibc_no_ustat.patch
index c46e8025cd..071dfc1aa8 100644
--- a/package/utils/xfsprogs/patches/110-uclibc_no_ustat.patch
+++ b/package/utils/xfsprogs/patches/110-uclibc_no_ustat.patch
@@ -8,13 +8,11 @@ diff --git a/libxfs/linux.c b/libxfs/linux.c
index 2e07d54..6a6c905 100644
--- a/libxfs/linux.c
+++ b/libxfs/linux.c
-@@ -21,7 +21,9 @@
+@@ -21,7 +21,6 @@
#include <mntent.h>
#include <sys/stat.h>
#undef ustat
-+#ifndef __UCLIBC__
- #include <sys/ustat.h>
-+#endif
+-#include <sys/ustat.h>
#include <sys/mount.h>
#include <sys/ioctl.h>
#include <sys/sysinfo.h>
@@ -22,7 +20,7 @@ index 2e07d54..6a6c905 100644
int
platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
{
-+#ifndef __UCLIBC__
++#if 0
/* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
struct ustat ust[2];
struct stat64 st;
diff --git a/package/utils/xfsprogs/patches/130-uclibc_no_xattr.patch b/package/utils/xfsprogs/patches/130-uclibc_no_xattr.patch
index b1ecda71e5..a9b5a6fe94 100644
--- a/package/utils/xfsprogs/patches/130-uclibc_no_xattr.patch
+++ b/package/utils/xfsprogs/patches/130-uclibc_no_xattr.patch
@@ -8,13 +8,11 @@ diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 40c2e6f..4f54059 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
-@@ -35,7 +35,9 @@
+@@ -35,7 +35,6 @@
#include <sys/wait.h>
#include <sys/vfs.h>
#include <sys/statvfs.h>
-+#ifndef __UCLIBC__
- #include <sys/xattr.h>
-+#endif
+-#include <sys/xattr.h>
#ifndef XFS_XFLAG_NODEFRAG
@@ -22,7 +20,7 @@ index 40c2e6f..4f54059 100644
int tfd,
xfs_bstat_t *bstatp)
{
-+#ifndef __UCLIBC__
++#if 0
struct stat64 tstatbuf;
int i;
int last_forkoff = 0;
diff --git a/package/utils/xfsprogs/patches/150-include_fixes.patch b/package/utils/xfsprogs/patches/150-include_fixes.patch
new file mode 100644
index 0000000000..793622a160
--- /dev/null
+++ b/package/utils/xfsprogs/patches/150-include_fixes.patch
@@ -0,0 +1,72 @@
+--- a/libhandle/handle.c
++++ b/libhandle/handle.c
+@@ -20,6 +20,7 @@
+ #include <xfs/xfs.h>
+ #include <xfs/handle.h>
+ #include <xfs/parent.h>
++#include <linux/limits.h>
+
+ /* just pick a value we know is more than big enough */
+ #define MAXHANSIZ 64
+--- a/libhandle/jdm.c
++++ b/libhandle/jdm.c
+@@ -20,6 +20,7 @@
+ #include <xfs/handle.h>
+ #include <xfs/jdm.h>
+ #include <xfs/parent.h>
++#include <linux/limits.h>
+
+ /* internal fshandle - typecast to a void for external use */
+ #define FSHANDLE_SZ 8
+--- a/libdisk/evms.c
++++ b/libdisk/evms.c
+@@ -22,6 +22,7 @@
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <sys/sysmacros.h>
++#include <sys/stat.h>
+ #include <disk/volume.h>
+ #include "evms.h"
+
+--- a/libdisk/evms.h
++++ b/libdisk/evms.h
+@@ -16,6 +16,8 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include <sys/types.h>
++
+ #define EVMS_MAJOR 117
+ #define EVMS_GET_VOL_STRIPE_INFO \
+ _IOR(EVMS_MAJOR, 0xF0, struct evms_vol_stripe_info_s)
+--- a/libdisk/fstype.h
++++ b/libdisk/fstype.h
+@@ -192,7 +192,7 @@ struct adfs_super_block {
+ 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 {
+--- a/fsr/xfs_fsr.c
++++ b/fsr/xfs_fsr.c
+@@ -25,6 +25,7 @@
+ #include <xfs/xfs_dinode.h>
+ #include <xfs/xfs_attr_sf.h>
+
++#include <paths.h>
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <malloc.h>
+--- a/libdisk/xvm.c
++++ b/libdisk/xvm.c
+@@ -22,6 +22,7 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+ #include <disk/volume.h>
+ #include "xvm.h"
+