mirror of
https://github.com/curl/curl.git
synced 2026-07-30 06:38:05 +03:00
lib: introduce CURL_ACCEPT()
To avoid overriding the system symbol `accept`, which is a macro on some
systems (AIX), and thus can't be called via the `(function)` PP trick.
It's also problematic to reset such macro to its original value.
Follow-up to 3bb5e58c10 #17827
Reported-by: Andrew Kirillov
Fixes #18500
Closes #18501
Closes #18502
This commit is contained in:
parent
f8ff233cdf
commit
9863599d69
7 changed files with 10 additions and 9 deletions
|
|
@ -1084,6 +1084,9 @@ CURL_EXTERN ALLOC_FUNC
|
|||
#define CURL_FREEADDRINFO(data) \
|
||||
curl_dbg_freeaddrinfo(data, __LINE__, __FILE__)
|
||||
|
||||
#define CURL_ACCEPT(sock,addr,len) \
|
||||
curl_dbg_accept(sock, addr, len, __LINE__, __FILE__)
|
||||
|
||||
#else /* !CURLDEBUG */
|
||||
|
||||
#define sclose(x) CURL_SCLOSE(x)
|
||||
|
|
@ -1092,6 +1095,8 @@ CURL_EXTERN ALLOC_FUNC
|
|||
#define CURL_GETADDRINFO getaddrinfo
|
||||
#define CURL_FREEADDRINFO freeaddrinfo
|
||||
|
||||
#define CURL_ACCEPT accept
|
||||
|
||||
#endif /* CURLDEBUG */
|
||||
|
||||
/* Some versions of the Android NDK is missing the declaration */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue