From f933f604e466f312b262dd072a15b40c86d5897c Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 25 Feb 2023 11:09:24 +0800 Subject: [PATCH] fix: undefine the strdup by default. --- include/os/osMemory.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/os/osMemory.h b/include/os/osMemory.h index 3f57c72933..c35fd782fb 100644 --- a/include/os/osMemory.h +++ b/include/os/osMemory.h @@ -29,9 +29,12 @@ extern "C" { #define calloc CALLOC_FUNC_TAOS_FORBID #define realloc REALLOC_FUNC_TAOS_FORBID #define free FREE_FUNC_TAOS_FORBID +#ifdef strdup +#undef strdup #define strdup STRDUP_FUNC_TAOS_FORBID -#endif // ifndef ALLOW_FORBID_FUNC +#endif +#endif // ifndef ALLOW_FORBID_FUNC #endif // if !defined(WINDOWS) int32_t taosMemoryDbgInit(); -- GitLab