On Thu, Jan 30, 2014 at 09:38:23AM -0800, Bobby Powers wrote: > Hello, > > sin wrote: > > This is in preparation to moving tar(1) over to recurse() > > instead of ftw(). > > On MacOS 10.9, strlcat and strncat are defined as macros, and adding > them to sbase breaks the builds. I'm not sure what the easy/nice > solution is. Error is below.
Please see the attached patch and let me know how it works for you. bye, sin
>From b618e87849d843153a949395b6f1294f1e0d7d94 Mon Sep 17 00:00:00 2001 From: sin <[email protected]> Date: Thu, 30 Jan 2014 18:06:22 +0000 Subject: [PATCH] Allow the user to choose between our strl*() and the environment's --- Makefile | 6 ++---- config.mk | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8a6790e..613cd44 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ include config.mk .SUFFIXES: .c .o HDR = crypt.h fs.h text.h md5.h sha1.h sha256.h sha512.h util.h arg.h -LIB = \ +LIB += \ util/afgets.o \ util/agetcwd.o \ util/apathmax.o \ @@ -22,9 +22,7 @@ LIB = \ util/rm.o \ util/sha1.o \ util/sha256.o \ - util/sha512.o \ - util/strlcat.o \ - util/strlcpy.o + util/sha512.o SRC = \ basename.c \ diff --git a/config.mk b/config.mk index a3ffc4d..91baa7a 100644 --- a/config.mk +++ b/config.mk @@ -5,6 +5,12 @@ VERSION = 0.0 PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man +# Some systems might provide strl*() functions as macros +# so just comment out the following lines. +LIB = \ + util/strlcpy.o \ + util/strlcat.o + #CC = gcc #CC = musl-gcc LD = $(CC) -- 1.8.5.3
