projects
/
c11tester.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compile under clang
[c11tester.git]
/
threads.cc
diff --git
a/threads.cc
b/threads.cc
index 61df56d773c4eaf91d273bcde0750541bcd9f0b7..5720ff77b45767432cc455a46ff94e8bc8b0d259 100644
(file)
--- a/
threads.cc
+++ b/
threads.cc
@@
-178,7
+178,7
@@
void real_init_all() {
}
if (!pthread_exit_p) {
}
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);
if ((error = dlerror()) != NULL) {
fputs(error, stderr);
exit(EXIT_FAILURE);