X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Faio%2Flio_listio.c;h=0799c15d8b16f362eb3f5d5b813c23f124c214a2;hb=34952fe5de44a833370cbe87b63fb8eec61466d7;hp=bd37767ebfe060a2ff147065e956505a10fa99ff;hpb=36c30c4ddd92ec3a058d54aac31a5734be6380f8;p=musl diff --git a/src/aio/lio_listio.c b/src/aio/lio_listio.c index bd37767e..0799c15d 100644 --- a/src/aio/lio_listio.c +++ b/src/aio/lio_listio.c @@ -3,7 +3,6 @@ #include #include #include "pthread_impl.h" -#include "libc.h" struct lio_state { struct sigevent *sev; @@ -114,7 +113,7 @@ int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st if (st) { pthread_attr_t a; - sigset_t set; + sigset_t set, set_old; pthread_t td; if (sev->sigev_notify == SIGEV_THREAD) { @@ -129,16 +128,16 @@ int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st } pthread_attr_setdetachstate(&a, PTHREAD_CREATE_DETACHED); sigfillset(&set); - pthread_sigmask(SIG_BLOCK, &set, &set); + pthread_sigmask(SIG_BLOCK, &set, &set_old); if (pthread_create(&td, &a, wait_thread, st)) { free(st); errno = EAGAIN; return -1; } - pthread_sigmask(SIG_SETMASK, &set, 0); + pthread_sigmask(SIG_SETMASK, &set_old, 0); } return 0; } -LFS64(lio_listio); +weak_alias(lio_listio, lio_listio64);