ladybird/Ports/cmake/patches/0019-libuv-so_linger.patch
AnotherTest 80d6f46d4e Ports: Add a cmake port
Yes, you build this *inside* serenity.
2021-02-15 17:32:56 +01:00

23 lines
720 B
Diff

--- a/Utilities/cmlibuv/src/unix/tcp.c 2021-02-12 22:52:26.980780866 +0330
+++ b/Utilities/cmlibuv/src/unix/tcp.c 2021-02-12 22:54:10.670863712 +0330
@@ -310,15 +310,19 @@ int uv_tcp_getpeername(const uv_tcp_t* h
int uv_tcp_close_reset(uv_tcp_t* handle, uv_close_cb close_cb) {
int fd;
+#ifndef __serenity__
struct linger l = { 1, 0 };
+#endif
/* Disallow setting SO_LINGER to zero due to some platform inconsistencies */
if (handle->flags & UV_HANDLE_SHUTTING)
return UV_EINVAL;
fd = uv__stream_fd(handle);
+#ifndef __serenity__
if (0 != setsockopt(fd, SOL_SOCKET, SO_LINGER, &l, sizeof(l)))
return UV__ERR(errno);
+#endif
uv_close((uv_handle_t*) handle, close_cb);
return 0;