mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
mingw: correct winsock recv() and send() buffer ptr type
This allows to build libwebsockets on MinGW. Winsock recv() and send() expect non unsigned char* while lws uses uint_8*. https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-send https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-recv
This commit is contained in:
parent
0033accb83
commit
28b1e1f463
1 changed files with 2 additions and 2 deletions
|
@ -564,7 +564,7 @@ lws_plat_mbedtls_net_send(void *ctx, const uint8_t *buf, size_t len)
|
|||
if (fd < 0)
|
||||
return MBEDTLS_ERR_NET_INVALID_CONTEXT;
|
||||
|
||||
ret = send(fd, buf, (unsigned int)len, 0);
|
||||
ret = send(fd, (const char *)buf, (unsigned int)len, 0);
|
||||
if (ret >= 0)
|
||||
return ret;
|
||||
|
||||
|
@ -589,7 +589,7 @@ lws_plat_mbedtls_net_recv(void *ctx, unsigned char *buf, size_t len)
|
|||
if (fd < 0)
|
||||
return MBEDTLS_ERR_NET_INVALID_CONTEXT;
|
||||
|
||||
ret = (int)recv(fd, buf, (unsigned int)len, 0);
|
||||
ret = (int)recv(fd, (char *)buf, (unsigned int)len, 0);
|
||||
if (ret >= 0)
|
||||
return ret;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue