]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_mem_undef.h: limit to `CURLDEBUG` for non-memalloc overrides
authorViktor Szakats <commit@vsz.me>
Wed, 10 Sep 2025 10:48:06 +0000 (12:48 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 10 Sep 2025 11:08:54 +0000 (13:08 +0200)
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

index b72e529ddeb7fe78d23a5653820c313ef1534542..acc3a9226aefc8da3f9b7da0ebb143e6e83a3fd0 100644 (file)
 #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