1
0
mirror of https://github.com/fumiama/simple-http-server.git synced 2026-06-05 00:30:23 +08:00

优化报错

This commit is contained in:
源文雨
2022-11-11 11:42:45 +08:00
parent 3f77a569c2
commit 970a1e6561

View File

@@ -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);
}
}