From 3ba74c43953087f441104f65918ed82f2078b4c3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 10 Sep 2025 12:48:06 +0200 Subject: [PATCH] curl_mem_undef.h: limit to `CURLDEBUG` for non-memalloc overrides To fix non-`CURLDEBUG` builds on 32-bit AIX, where `fopen` is a system macro. Ref: #18502 Ref: https://github.com/curl/curl/pull/18502/commits/793a375ce3002454599ffe2d7b561b6340103306 Follow-up to 3bb5e58c105d7be450b667858d1b8e7ae3ded555 #17827 Reported-by: Andrew Kirillov Fixes #18510 Closes #18514 --- lib/curl_mem_undef.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/curl_mem_undef.h b/lib/curl_mem_undef.h index b72e529dde..acc3a9226a 100644 --- a/lib/curl_mem_undef.h +++ b/lib/curl_mem_undef.h @@ -29,13 +29,15 @@ #undef calloc #undef realloc #undef free -#undef send -#undef recv - #ifdef _WIN32 #undef _tcsdup #endif +#ifdef CURLDEBUG + +#undef send +#undef recv + #undef socket #ifdef HAVE_ACCEPT4 #undef accept4 @@ -51,5 +53,7 @@ #undef fdopen #undef fclose +#endif /* CURLDEBUG */ + #undef HEADER_CURL_MEMORY_H #undef HEADER_CURL_MEMDEBUG_H