aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Howard <gavin@yzena.com>2021-08-13 13:39:57 -0600
committerGavin Howard <gavin@yzena.com>2021-08-13 13:39:57 -0600
commitbbe78f848ce5d471993aa083b8f81f78214f0924 (patch)
tree29f881ef62750fcf08d77891cdea4a26726fc997
parent7e218161a9d24ced06bd250350afe8a5b815ae08 (diff)
downloadbc-bbe78f848ce5d471993aa083b8f81f78214f0924.tar.gz
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 <gavin@yzena.com>
-rw-r--r--include/vector.h4
-rw-r--r--src/vector.c2
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;