diff --git a/cmake/SgFlags.cmake b/cmake/SgFlags.cmake index f173201..a4cca25 100644 --- a/cmake/SgFlags.cmake +++ b/cmake/SgFlags.cmake @@ -19,7 +19,7 @@ # # Cross-platform library which helps to develop web servers or frameworks. # -# Copyright (C) 2016-2019 Silvio Clecio +# Copyright (C) 2016-2024 Silvio Clecio # # Sagui library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -49,7 +49,7 @@ if(MINGW) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static") endif() -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT APPLE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--allow-multiple-definition") endif() diff --git a/test/test_str.c b/test/test_str.c index a9a7bec..0158eb9 100644 --- a/test/test_str.c +++ b/test/test_str.c @@ -7,7 +7,7 @@ * * Cross-platform library which helps to develop web servers or frameworks. * - * Copyright (C) 2016-2020 Silvio Clecio + * Copyright (C) 2016-2024 Silvio Clecio * * Sagui library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -44,9 +44,9 @@ static void test_str_printf_va(struct sg_str *str, const char *fmt, va_list ap) { ASSERT(sg_str_printf_va(NULL, fmt, ap) == EINVAL); ASSERT(sg_str_printf_va(str, NULL, ap) == EINVAL); -#ifndef __arm__ +#if !(defined(__arm__) || defined(__arm64__)) ASSERT(sg_str_printf_va(str, fmt, NULL) == EINVAL); -#endif /* __arm__ */ +#endif /* !(__arm__ || __arm64__) */ sg_str_clear(str); sg_str_printf_va(str, fmt, ap); diff --git a/test/test_utils.c b/test/test_utils.c index fbeb34e..d028b9a 100644 --- a/test/test_utils.c +++ b/test/test_utils.c @@ -7,7 +7,7 @@ * * Cross-platform library which helps to develop web servers or frameworks. * - * Copyright (C) 2016-2020 Silvio Clecio + * Copyright (C) 2016-2024 Silvio Clecio * * Sagui library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -477,7 +477,9 @@ static void test_tmpdir(void) { ASSERT(strcmp(tmp, path) == 0); #elif defined(__ANDROID__) /* _WIN32 */ ASSERT(strcmp(tmp, "/data/local/tmp") == 0); -#else /* __ANDROID__ */ +#elif defined(__APPLE__) /* __ANDROID__*/ + ASSERT(strncmp(tmp, getenv("TMPDIR"), strlen(tmp)) == 0); +#else /* __APPLE__ */ ASSERT(strcmp(tmp, "/tmp") == 0); #endif /* _WIN32 */ sg_free(tmp);