From: Florian Weimer Date: Wed, 24 Jun 2020 11:38:08 +0000 (+0200) Subject: htl: Add wrapper header for with hidden __sem_post X-Git-Tag: glibc-2.32~173 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fb7dc751edc462f6954b9c16dd126bf48a1df18;p=thirdparty%2Fglibc.git htl: Add wrapper header for with hidden __sem_post This is required to avoid a check-localplt failure due to a sem_post call through the PLT. Reviewed-by: Samuel Thibault --- diff --git a/sysdeps/htl/include/semaphore.h b/sysdeps/htl/include/semaphore.h new file mode 100644 index 00000000000..58fa2bf3413 --- /dev/null +++ b/sysdeps/htl/include/semaphore.h @@ -0,0 +1,9 @@ +#ifndef _SEMAPHORE_H +#include_next + +#ifndef _ISOMAC +extern __typeof (sem_post) __sem_post; +libpthread_hidden_proto (__sem_post) +#endif + +#endif diff --git a/sysdeps/htl/sem-post.c b/sysdeps/htl/sem-post.c index fd0c6338c68..720b73a0593 100644 --- a/sysdeps/htl/sem-post.c +++ b/sysdeps/htl/sem-post.c @@ -64,5 +64,5 @@ __sem_post (sem_t *sem) return 0; } - +libpthread_hidden_def (__sem_post) strong_alias (__sem_post, sem_post); diff --git a/sysdeps/htl/sem-timedwait.c b/sysdeps/htl/sem-timedwait.c index fffdf36467f..5095d49b284 100644 --- a/sysdeps/htl/sem-timedwait.c +++ b/sysdeps/htl/sem-timedwait.c @@ -167,7 +167,7 @@ out_locked: { if (ret == 0 && ctx.cancel_wake == 0) /* We were cancelled while waking up with a token, put it back. */ - sem_post (sem); + __sem_post (sem); __pthread_exit (PTHREAD_CANCELED); }