From 7e218161a9d24ced06bd250350afe8a5b815ae08 Mon Sep 17 00:00:00 2001 From: Gavin Howard Date: Wed, 11 Aug 2021 17:45:46 -0600 Subject: Fix a build error on Android This disables the library by default if BC_ENABLE_LIBRARY is not defined. I can do this because bcl.h still enables it for using building with the library. Signed-off-by: Gavin Howard --- include/status.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/status.h b/include/status.h index 781248ad..662f2b89 100644 --- a/include/status.h +++ b/include/status.h @@ -53,6 +53,10 @@ #define DC_ENABLED (1) #endif // DC_ENABLED +#ifndef BC_ENABLE_LIBRARY +#define BC_ENABLE_LIBRARY (0) +#endif // BC_ENABLE_LIBRARY + // This is error checking for fuzz builds. #if BC_ENABLE_AFL #ifndef __AFL_HAVE_MANUAL_CONTROL -- cgit v1.2.3 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 From 5e98c6229be8333de539697b38efa716fd42f7ee Mon Sep 17 00:00:00 2001 From: Gavin Howard Date: Fri, 13 Aug 2021 13:42:54 -0600 Subject: Increment the version and update the NEWS Signed-off-by: Gavin Howard --- NEWS.md | 9 +++++++++ include/version.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 3b1477ca..90682435 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,14 @@ # News +## 5.0.1 + +This is a production release with two fixes: + +* Fix for the build on Mac OSX. +* Fix for the build on Android. + +Users that do not use those platforms do ***NOT*** need to update. + ## 5.0.0 This is a major production release with several changes: diff --git a/include/version.h b/include/version.h index 5127c28e..946dc67b 100644 --- a/include/version.h +++ b/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 5.0.0 +#define VERSION 5.0.1 #endif // BC_VERSION_H -- cgit v1.2.3