mirror of
https://github.com/curl/curl.git
synced 2026-04-30 19:37:51 +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
|
|
@ -765,8 +765,8 @@ static DWORD WINAPI win_stdin_thread_func(void *thread_data)
|
|||
SOCKADDR_IN clientAddr;
|
||||
int clientAddrLen = sizeof(clientAddr);
|
||||
|
||||
curl_socket_t socket_w = accept(tdata->socket_l, (SOCKADDR*)&clientAddr,
|
||||
&clientAddrLen);
|
||||
curl_socket_t socket_w = CURL_ACCEPT(tdata->socket_l, (SOCKADDR*)&clientAddr,
|
||||
&clientAddrLen);
|
||||
|
||||
if(socket_w == CURL_SOCKET_BAD) {
|
||||
errorf("accept error: %08lx", GetLastError());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue