void-packages/srcpkgs/xfsprogs/patches/musl-fixes.patch
maxice8 37218637d1 xfsprogs: update to 4.15.0.
Closes: #11856 [via git-merge-pr]
2018-02-24 18:39:17 -08:00

91 lines
1.9 KiB
Diff

--- fsr/xfs_fsr.c.orig 2016-12-21 06:36:07.000000000 +0100
+++ fsr/xfs_fsr.c 2017-01-16 15:13:16.077553350 +0100
@@ -36,6 +36,9 @@
#define _PATH_FSRLAST "/var/tmp/.fsrlast_xfs"
#define _PATH_PROC_MOUNTS "/proc/mounts"
+#ifndef _PATH_MOUNTED
+#define _PATH_MOUNTED MOUNTED
+#endif
char *progname;
--- include/linux.h.orig 2016-12-21 06:36:07.000000000 +0100
+++ include/linux.h 2017-01-16 15:15:39.600759063 +0100
@@ -40,6 +40,32 @@
# undef fsxattr
#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 __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
{
return ioctl(fd, cmd, p);
--- io/readdir.c.orig 2017-01-05 18:41:55.000000000 +0100
+++ io/readdir.c 2017-01-16 15:19:55.995553687 +0100
@@ -24,6 +24,18 @@
#include <sys/types.h>
#include <dirent.h>
+#if defined (__linux__)
+#ifndef _DIRENT_HAVE_D_OFF
+#define _DIRENT_HAVE_D_OFF
+#endif
+#ifndef _DIRENT_HAVE_D_RECLEN
+#define _DIRENT_HAVE_D_RECLEN
+#endif
+#ifndef _DIRENT_HAVE_D_TYPE
+#define _DIRENT_HAVE_D_TYPE
+#endif
+#endif
+
static struct cmdinfo readdir_cmd;
const char *d_type_str(unsigned int type)
--- scrub/read_verify.c
+++ scrub/read_verify.c
@@ -22,6 +22,7 @@
#include <stdbool.h>
#include <stdlib.h>
#include <sys/statvfs.h>
+#include <pthread.h>
#include "workqueue.h"
#include "path.h"
#include "xfs.h"
--- scrub/xfs_scrub.c
+++ scrub/xfs_scrub.c
@@ -195,6 +195,10 @@ usage(void)
# define RUSAGE_BOTH (-2)
#endif
+#ifndef _PATH_MOUNTED
+#define _PATH_MOUNTED MOUNTED
+#endif
+
/* Get resource usage for ourselves and all children. */
static int
scrub_getrusage(