Reworked Makefile for consistency between packages. Removed librt dependency. clock_gettime does not need it anymore. Updated URL. Add MAP_SYNC workaround as musl undefines MAP_SYNC for MIPS and PPC. Refreshed patches and removed upstream ones Signed-off-by: Rosen Penev <rosenp@gmail.com>lilik-openwrt-22.03
@ -1,14 +0,0 @@ | |||
--- a/libxfs/Makefile | |||
+++ b/libxfs/Makefile | |||
@@ -118,9 +118,9 @@ LTLIBS = $(LIBPTHREAD) $(LIBRT) | |||
# don't try linking xfs_repair with a debug libxfs. | |||
DEBUG = -DNDEBUG | |||
-LDIRT = gen_crc32table crc32table.h crc32selftest | |||
+LDIRT = gen_crc32table crc32table.h | |||
-default: crc32selftest ltdepend $(LTLIBRARY) | |||
+default: ltdepend $(LTLIBRARY) | |||
crc32table.h: gen_crc32table.c | |||
@echo " [CC] gen_crc32table" |
@ -1,12 +1,12 @@ | |||
--- a/Makefile | |||
+++ b/Makefile | |||
@@ -46,8 +46,7 @@ HDR_SUBDIRS = include libxfs | |||
@@ -62,8 +62,7 @@ HDR_SUBDIRS = include libxfs | |||
LIBFROG_SUBDIR = libfrog | |||
DLIB_SUBDIRS = libxlog libxcmd libhandle | |||
LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS) | |||
-TOOL_SUBDIRS = copy db estimate fsck growfs io logprint mkfs quota \ | |||
- mdrestore repair rtcp m4 man doc debian | |||
-TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \ | |||
- mdrestore repair rtcp m4 man doc debian spaceman | |||
+TOOL_SUBDIRS = db fsck growfs io mkfs repair | |||
ifneq ("$(PKG_PLATFORM)","darwin") | |||
TOOL_SUBDIRS += fsr | |||
ifeq ("$(ENABLE_SCRUB)","yes") | |||
TOOL_SUBDIRS += scrub |
@ -1,12 +1,12 @@ | |||
--- a/libxfs/libxfs_priv.h | |||
+++ b/libxfs/libxfs_priv.h | |||
@@ -84,9 +84,6 @@ extern uint32_t crc32c_le(uint32_t crc, | |||
@@ -85,9 +85,6 @@ struct iomap; | |||
/* for all the support code that uses progname in error messages */ | |||
extern char *progname; | |||
-#undef ASSERT | |||
-#define ASSERT(ex) assert(ex) | |||
- | |||
#ifndef EWRONGFS | |||
#define EWRONGFS EINVAL | |||
#endif | |||
/* | |||
* We have no need for the "linux" dev_t in userspace, so these | |||
* are no-ops, and an xfs_dev_t is stored in VFS_I(ip)->i_rdev |
@ -1,48 +0,0 @@ | |||
From 8041435de7ed028a27ecca64302945ad455c69a6 Mon Sep 17 00:00:00 2001 | |||
From: "Darrick J. Wong" <darrick.wong@oracle.com> | |||
Date: Mon, 5 Feb 2018 14:38:02 -0600 | |||
Subject: [PATCH] xfs_io: fix copy_file_range symbol name collision | |||
glibc 2.27 has a copy_file_range wrapper, so we need to change our | |||
internal function out of the way to avoid compiler warnings. | |||
Reported-by: fredrik@crux.nu | |||
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> | |||
Reviewed-by: Eric Sandeen <sandeen@redhat.com> | |||
Signed-off-by: Eric Sandeen <sandeen@sandeen.net> | |||
--- | |||
io/copy_file_range.c | 11 ++++++++--- | |||
1 file changed, 8 insertions(+), 3 deletions(-) | |||
--- a/io/copy_file_range.c | |||
+++ b/io/copy_file_range.c | |||
@@ -42,13 +42,18 @@ copy_range_help(void) | |||
")); | |||
} | |||
+/* | |||
+ * Issue a raw copy_file_range syscall; for our test program we don't want the | |||
+ * glibc buffered copy fallback. | |||
+ */ | |||
static loff_t | |||
-copy_file_range(int fd, loff_t *src, loff_t *dst, size_t len) | |||
+copy_file_range_cmd(int fd, loff_t *src, loff_t *dst, size_t len) | |||
{ | |||
loff_t ret; | |||
do { | |||
- ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst, len, 0); | |||
+ ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst, | |||
+ len, 0); | |||
if (ret == -1) { | |||
perror("copy_range"); | |||
return errno; | |||
@@ -130,7 +135,7 @@ copy_range_f(int argc, char **argv) | |||
copy_dst_truncate(); | |||
} | |||
- ret = copy_file_range(fd, &src, &dst, len); | |||
+ ret = copy_file_range_cmd(fd, &src, &dst, len); | |||
close(fd); | |||
return ret; | |||
} |
@ -0,0 +1,13 @@ | |||
--- a/io/mmap.c | |||
+++ b/io/mmap.c | |||
@@ -11,6 +11,10 @@ | |||
#include "init.h" | |||
#include "io.h" | |||
+#ifndef MAP_SYNC | |||
+#define MAP_SYNC 0 | |||
+#endif | |||
+ | |||
static cmdinfo_t mmap_cmd; | |||
static cmdinfo_t mread_cmd; | |||
static cmdinfo_t msync_cmd; |