From 970a1e6561a7ab4d05bcdde67f61c3a4cb1e8757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Fri, 11 Nov 2022 11:42:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.c b/server.c index 64bc4d1..6447fad 100644 --- a/server.c +++ b/server.c @@ -547,7 +547,7 @@ static int accept_client(int is_unix_sock) { printf("Accept client %s:%u\n", str, port); } pthread_t accept_thread; - if(pthread_create(&accept_thread, &attr, &accept_request, client_sock) != 0) perror("pthread_create"); + if(pthread_create(&accept_thread, &attr, &accept_request, (void*)(uintptr_t)client_sock) != 0) perror("pthread_create"); printf("Created new thread at %p\n", (void*)accept_thread); } }