diff options
author | Rosen Penev <rosenp@gmail.com> | 2019-11-07 14:55:10 -0800 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2019-11-09 14:33:42 +0100 |
commit | 39035df71c37d474be2cb2a0fad8d70da095c68b (patch) | |
tree | 44621f22261f04781433841f465f823b01608bff /package/utils/xfsprogs/patches/140-copy-file-range.patch | |
parent | 5b3f0e70a10e551afce27aeb826caaee3889829c (diff) | |
download | upstream-39035df71c37d474be2cb2a0fad8d70da095c68b.tar.gz upstream-39035df71c37d474be2cb2a0fad8d70da095c68b.tar.bz2 upstream-39035df71c37d474be2cb2a0fad8d70da095c68b.zip |
xfsprogs: Fix compilation with newer musl
Backported upstream patch.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'package/utils/xfsprogs/patches/140-copy-file-range.patch')
-rw-r--r-- | package/utils/xfsprogs/patches/140-copy-file-range.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/package/utils/xfsprogs/patches/140-copy-file-range.patch b/package/utils/xfsprogs/patches/140-copy-file-range.patch new file mode 100644 index 0000000000..076d5c95da --- /dev/null +++ b/package/utils/xfsprogs/patches/140-copy-file-range.patch @@ -0,0 +1,48 @@ +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; + } |