From 88d21086018b797fbd9f57867751f8f823bb2474 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 27 Nov 2019 14:39:51 -0800 Subject: [PATCH] Fix compile under clang --- threads.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/threads.cc b/threads.cc index 61df56d7..5720ff77 100644 --- a/threads.cc +++ b/threads.cc @@ -178,7 +178,7 @@ void real_init_all() { } if (!pthread_exit_p) { - pthread_exit_p = (void (*)(void *))dlsym(RTLD_NEXT, "pthread_exit"); + *((void (**)(void *)) &pthread_exit_p) = (void (*)(void *))dlsym(RTLD_NEXT, "pthread_exit"); if ((error = dlerror()) != NULL) { fputs(error, stderr); exit(EXIT_FAILURE); -- 2.34.1