Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1752657670, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ {"schema":"libjg2-1", "cid":"aa9b6ab08d8a66fe0f485bd9bf279940", "commit": {"type":"commit", "time": 1647340089, "time_ofs": 0, "oid_tree": { "oid": "31275d6ab5a4f223c0830a1469022504f708e831", "alias": []}, "oid":{ "oid": "b61174b4b0792ff12c189fb7e8d014e8e98211fd", "alias": []}, "msg": "mingw: correct winsock recv() and send() buffer ptr type", "sig_commit": { "git_time": { "time": 1647340089, "offset": 0 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1644835987, "offset": 60 }, "name": "Luciano Iam", "email": "oss@lucianoiam.com", "md5": "fa294df8b952401efe596257ef8891ec" }}, "body": "mingw: correct winsock recv() and send() buffer ptr type\n\nThis allows to build libwebsockets on MinGW. Winsock recv() and send()\nexpect non unsigned char* while lws uses uint_8*.\n\nhttps://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-send\nhttps://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-recv\n" , "diff": "diff --git a/lib/plat/windows/windows-sockets.c b/lib/plat/windows/windows-sockets.c\nindex 6bbc066..9e8ce26 100644\n--- a/lib/plat/windows/windows-sockets.c\n+++ b/lib/plat/windows/windows-sockets.c\n@@ -604,7 +604,7 @@ lws_plat_mbedtls_net_send(void *ctx, const uint8_t *buf, size_t len)\n \tif (fd \u003c 0)\n \t\treturn MBEDTLS_ERR_NET_INVALID_CONTEXT;\n \n-\tret \u003d send(fd, buf, (unsigned int)len, 0);\n+\tret \u003d send(fd, (const char *)buf, (unsigned int)len, 0);\n \tif (ret \u003e\u003d 0)\n \t\treturn ret;\n \n@@ -629,7 +629,7 @@ lws_plat_mbedtls_net_recv(void *ctx, unsigned char *buf, size_t len)\n \tif (fd \u003c 0)\n \t\treturn MBEDTLS_ERR_NET_INVALID_CONTEXT;\n \n-\tret \u003d (int)recv(fd, buf, (unsigned int)len, 0);\n+\tret \u003d (int)recv(fd, (char *)buf, (unsigned int)len, 0);\n \tif (ret \u003e\u003d 0)\n \t\treturn ret;\n \n","s":{"c":1752657670,"u": 2091}} ],"g": 2923,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}