Skip to content
This repository was archived by the owner on Jun 19, 2026. It is now read-only.

Commit adecb47

Browse files
committed
WSAEAI_AGAIN issue fix
1 parent 9ee0b63 commit adecb47

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

runtime/ferret_runtime_net_tcp.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,14 @@ static ferret_i32 ferret__net_map_error_code(int code, ferret_bool addrinfo_code
201201
case WSAHOST_NOT_FOUND:
202202
case WSANO_DATA:
203203
return FERRET_IO_ERR_NOT_FOUND;
204-
case WSAEAI_AGAIN:
205-
return FERRET_IO_ERR_TIMED_OUT;
204+
/* MinGW variants may not define WSAEAI_AGAIN; WSATRY_AGAIN is commonly available */
205+
#if defined(WSAEAI_AGAIN)
206+
case WSAEAI_AGAIN:
207+
return FERRET_IO_ERR_TIMED_OUT;
208+
#elif defined(WSATRY_AGAIN)
209+
case WSATRY_AGAIN:
210+
return FERRET_IO_ERR_TIMED_OUT;
211+
#endif
206212
default:
207213
return FERRET_IO_ERR_UNKNOWN;
208214
}

0 commit comments

Comments
 (0)