On 13/04/2022 21:55, Jeffrey Walton wrote:
Hi Pádraig,Below is from a Mac-Mini (Intel), x86_84, OS X 10.12. The attachment used 'make -k'. Obviously, it did not move on to 'make check'. $ sw_vers ProductName: Mac OS X ProductVersion: 10.12.6 BuildVersion: 16G2136 $ make -k V=1 2>&1 | tee coreutils-make.log ... gcc -g -O2 -o src/comm src/comm.o src/libver.a lib/libcoreutils.a -L/usr/local/lib -li ntl -liconv -ldl -lpthread -Wl,-framework -Wl,CoreFoundation lib/libcoreutils.a depbase=`echo src/cp.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ gcc -I. -I./lib -Ilib -I./lib -Isrc -I./src -I/usr/local/include -g -O2 -MT sr c/cp.o -MD -MP -MF $depbase.Tpo -c -o src/cp.o src/cp.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=`echo src/copy.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ gcc -I. -I./lib -Ilib -I./lib -Isrc -I./src -I/usr/local/include -g -O2 -MT sr c/copy.o -MD -MP -MF $depbase.Tpo -c -o src/copy.o src/copy.c &&\ mv -f $depbase.Tpo $depbase.Po src/copy.c:1192:53: error: use of undeclared identifier 'CLONE_NOOWNERCOPY' int clone_flags = x->preserve_ownership ? 0 : CLONE_NOOWNERCOPY; ^ 1 error generated. make[2]: *** [src/copy.o] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Oh nice one. The attached should fix this up. thanks! Pádraig
From bcfbcef928cd540e53d35fc2869d9def2fedeb84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]> Date: Thu, 14 Apr 2022 13:35:22 +0100 Subject: [PATCH] build: copy: fix build on macos 10.12 * src/copy.c (copy_reg): Handle the case where CLONE_NOOWNERCOPY is not defined. Reported by Jeffrey Walton --- src/copy.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/copy.c b/src/copy.c index cb31067cd..b15d91990 100644 --- a/src/copy.c +++ b/src/copy.c @@ -1189,9 +1189,14 @@ copy_reg (char const *src_name, char const *dst_name, if (*new_dst) { #if HAVE_FCLONEFILEAT && !USE_XATTR +/* CLONE_NOOWNERCOPY only available on macos >= 10.13. */ +# ifndef CLONE_NOOWNERCOPY +# define CLONE_NOOWNERCOPY 0 +# endif int clone_flags = x->preserve_ownership ? 0 : CLONE_NOOWNERCOPY; if (data_copy_required && x->reflink_mode && x->preserve_mode && x->preserve_timestamps + && (x->preserve_ownership || CLONE_NOOWNERCOPY) && (fclonefileat (source_desc, dst_dirfd, dst_relname, clone_flags) == 0)) goto close_src_desc; -- 2.26.2
