From bbe78f848ce5d471993aa083b8f81f78214f0924 Mon Sep 17 00:00:00 2001 From: Gavin Howard Date: Fri, 13 Aug 2021 13:39:57 -0600 Subject: Fix a build error on Mac OSX This was found and fixed by enh-google (GitHub username), whose email address I could not find. While I changed the patch slightly, the fix is not mine. Signed-off-by: Gavin Howard --- include/vector.h | 4 ++-- src/vector.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/vector.h b/include/vector.h index 8f7cbbcc..c35d22c9 100644 --- a/include/vector.h +++ b/include/vector.h @@ -441,7 +441,7 @@ void bc_slabvec_print(BcVec *v, const char *func); * contain @a s. * @param s The source string. */ -#define strcpy(d, l, s) strcpy(d, s) +#define bc_strcpy(d, l, s) strcpy(d, s) #else // _WIN32 @@ -452,7 +452,7 @@ void bc_slabvec_print(BcVec *v, const char *func); * contain @a s. * @param s The source string. */ -#define strcpy(d, l, s) strcpy_s(d, l, s) +#define bc_strcpy(d, l, s) strcpy_s(d, l, s) #endif // _WIN32 diff --git a/src/vector.c b/src/vector.c index 1cd90f72..ebc2e76c 100644 --- a/src/vector.c +++ b/src/vector.c @@ -461,7 +461,7 @@ static char* bc_slab_add(BcSlab *s, const char *str, size_t len) { ptr = (char*) (s->s + s->len); - strcpy(ptr, len, str); + bc_strcpy(ptr, len, str); s->len += len; -- cgit v1.2.3