diff --git a/lib/libc/gen/libc_interposing_table.c b/lib/libc/gen/libc_interposing_table.c --- a/lib/libc/gen/libc_interposing_table.c +++ b/lib/libc/gen/libc_interposing_table.c @@ -49,7 +49,6 @@ interpos_func_t * __libc_interposing_slot(int interposno) { - /* XXX: forward compat. Remove after 15.0-RELEASE. */ if (__libc_interposing[interposno] == NULL) return (__libsys_interposing_slot(interposno)); return (&__libc_interposing[interposno]); diff --git a/lib/libc/gen/sleep.c b/lib/libc/gen/sleep.c --- a/lib/libc/gen/sleep.c +++ b/lib/libc/gen/sleep.c @@ -56,7 +56,7 @@ time_to_sleep.tv_sec = seconds; time_to_sleep.tv_nsec = 0; if (((int (*)(const struct timespec *, struct timespec *)) - (*__libsys_interposing_slot(INTERPOS_nanosleep)))( + (*__libc_interposing_slot(INTERPOS_nanosleep)))( &time_to_sleep, &time_remaining) != -1) return (0); if (errno != EINTR) diff --git a/lib/libc/gen/usleep.c b/lib/libc/gen/usleep.c --- a/lib/libc/gen/usleep.c +++ b/lib/libc/gen/usleep.c @@ -46,7 +46,7 @@ time_to_sleep.tv_nsec = (useconds % 1000000) * 1000; time_to_sleep.tv_sec = useconds / 1000000; return (((int (*)(const struct timespec *, struct timespec *)) - (*__libsys_interposing_slot(INTERPOS_nanosleep)))(&time_to_sleep, + (*__libc_interposing_slot(INTERPOS_nanosleep)))(&time_to_sleep, NULL)); } diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -201,7 +201,6 @@ interpos_func_t *__libc_interposing_slot(int interposno); extern interpos_func_t __libc_interposing[] __hidden; interpos_func_t *__libsys_interposing_slot(int interposno); -extern interpos_func_t __libsys_interposing[] __hidden; enum { INTERPOS_accept, diff --git a/lib/libsys/accept.c b/lib/libsys/accept.c --- a/lib/libsys/accept.c +++ b/lib/libsys/accept.c @@ -41,5 +41,5 @@ accept(int s, struct sockaddr *addr, socklen_t *addrlen) { return (((int (*)(int, struct sockaddr *, socklen_t *)) - __libsys_interposing[INTERPOS_accept])(s, addr, addrlen)); + *(__libc_interposing_slot(INTERPOS_accept)))(s, addr, addrlen)); } diff --git a/lib/libsys/accept4.c b/lib/libsys/accept4.c --- a/lib/libsys/accept4.c +++ b/lib/libsys/accept4.c @@ -41,5 +41,6 @@ accept4(int s, struct sockaddr *addr, socklen_t *addrlen, int flags) { return (((int (*)(int, struct sockaddr *, socklen_t *, int)) - __libsys_interposing[INTERPOS_accept4])(s, addr, addrlen, flags)); + *(__libc_interposing_slot(INTERPOS_accept4))) + (s, addr, addrlen, flags)); } diff --git a/lib/libsys/aio_suspend.c b/lib/libsys/aio_suspend.c --- a/lib/libsys/aio_suspend.c +++ b/lib/libsys/aio_suspend.c @@ -42,5 +42,6 @@ { return (((int (*)(const struct aiocb * const[], int, const struct timespec *)) - __libsys_interposing[INTERPOS_aio_suspend])(iocbs, niocb, timeout)); + *(__libc_interposing_slot(INTERPOS_aio_suspend))) + (iocbs, niocb, timeout)); } diff --git a/lib/libsys/clock_nanosleep.c b/lib/libsys/clock_nanosleep.c --- a/lib/libsys/clock_nanosleep.c +++ b/lib/libsys/clock_nanosleep.c @@ -43,6 +43,6 @@ { return (((int (*)(clockid_t, int, const struct timespec *, struct timespec *)) - __libsys_interposing[INTERPOS_clock_nanosleep])(clock_id, flags, - rqtp, rmtp)); + *(__libc_interposing_slot(INTERPOS_clock_nanosleep))) + (clock_id, flags, rqtp, rmtp)); } diff --git a/lib/libsys/close.c b/lib/libsys/close.c --- a/lib/libsys/close.c +++ b/lib/libsys/close.c @@ -40,5 +40,5 @@ int close(int fd) { - return (((int (*)(int))__libsys_interposing[INTERPOS_close])(fd)); + return (((int (*)(int))*(__libc_interposing_slot(INTERPOS_close)))(fd)); } diff --git a/lib/libsys/connect.c b/lib/libsys/connect.c --- a/lib/libsys/connect.c +++ b/lib/libsys/connect.c @@ -41,5 +41,5 @@ connect(int s, const struct sockaddr *addr, socklen_t addrlen) { return (((int (*)(int, const struct sockaddr *, socklen_t)) - __libsys_interposing[INTERPOS_connect])(s, addr, addrlen)); + *(__libc_interposing_slot(INTERPOS_connect)))(s, addr, addrlen)); } diff --git a/lib/libsys/creat.c b/lib/libsys/creat.c --- a/lib/libsys/creat.c +++ b/lib/libsys/creat.c @@ -44,7 +44,7 @@ __creat(const char *path, mode_t mode) { return (((int (*)(int, const char *, int, ...)) - __libsys_interposing[INTERPOS_openat])(AT_FDCWD, path, O_WRONLY | - O_CREAT | O_TRUNC, mode)); + *(__libc_interposing_slot(INTERPOS_openat))) + (AT_FDCWD, path, O_WRONLY | O_CREAT | O_TRUNC, mode)); } diff --git a/lib/libsys/fcntl.c b/lib/libsys/fcntl.c --- a/lib/libsys/fcntl.c +++ b/lib/libsys/fcntl.c @@ -50,5 +50,5 @@ va_end(args); return (((int (*)(int, int, ...)) - __libsys_interposing[INTERPOS_fcntl])(fd, cmd, arg)); + *(__libc_interposing_slot(INTERPOS_fcntl)))(fd, cmd, arg)); } diff --git a/lib/libsys/fdatasync.c b/lib/libsys/fdatasync.c --- a/lib/libsys/fdatasync.c +++ b/lib/libsys/fdatasync.c @@ -37,5 +37,6 @@ int fdatasync(int fd) { - return (((int (*)(int))__libsys_interposing[INTERPOS_fdatasync])(fd)); + return (((int (*)(int))*(__libc_interposing_slot(INTERPOS_fdatasync))) + (fd)); } diff --git a/lib/libsys/fork.c b/lib/libsys/fork.c --- a/lib/libsys/fork.c +++ b/lib/libsys/fork.c @@ -39,5 +39,5 @@ pid_t fork(void) { - return (((pid_t (*)(void))__libsys_interposing[INTERPOS_fork])()); + return (((pid_t (*)(void))*(__libc_interposing_slot(INTERPOS_fork)))()); } diff --git a/lib/libsys/fsync.c b/lib/libsys/fsync.c --- a/lib/libsys/fsync.c +++ b/lib/libsys/fsync.c @@ -39,5 +39,5 @@ int fsync(int fd) { - return (((int (*)(int))__libsys_interposing[INTERPOS_fsync])(fd)); + return (((int (*)(int))*(__libc_interposing_slot(INTERPOS_fsync)))(fd)); } diff --git a/lib/libsys/interposing_table.c b/lib/libsys/interposing_table.c --- a/lib/libsys/interposing_table.c +++ b/lib/libsys/interposing_table.c @@ -34,7 +34,7 @@ #define SLOT(a, b) \ [INTERPOS_##a] = (interpos_func_t)b -interpos_func_t __libsys_interposing[INTERPOS_MAX] = { +static interpos_func_t __libsys_interposing[INTERPOS_MAX] = { SLOT(accept, __sys_accept), SLOT(accept4, __sys_accept4), SLOT(aio_suspend, __sys_aio_suspend), diff --git a/lib/libsys/kevent.c b/lib/libsys/kevent.c --- a/lib/libsys/kevent.c +++ b/lib/libsys/kevent.c @@ -43,6 +43,6 @@ { return (((int (*)(int, const struct kevent *, int, struct kevent *, int, const struct timespec *)) - __libsys_interposing[INTERPOS_kevent])(kq, changelist, nchanges, - eventlist, nevents, timeout)); + *(__libc_interposing_slot(INTERPOS_kevent))) + (kq, changelist, nchanges, eventlist, nevents, timeout)); } diff --git a/lib/libsys/lockf.c b/lib/libsys/lockf.c --- a/lib/libsys/lockf.c +++ b/lib/libsys/lockf.c @@ -63,8 +63,8 @@ case F_TEST: fl.l_type = F_WRLCK; if (((int (*)(int, int, ...)) - __libsys_interposing[INTERPOS_fcntl])(filedes, F_GETLK, &fl) - == -1) + *(__libc_interposing_slot(INTERPOS_fcntl))) + (filedes, F_GETLK, &fl) == -1) return (-1); if (fl.l_type == F_UNLCK || (fl.l_sysid == 0 && fl.l_pid == getpid())) @@ -79,5 +79,5 @@ } return (((int (*)(int, int, ...)) - __libsys_interposing[INTERPOS_fcntl])(filedes, cmd, &fl)); + *(__libc_interposing_slot(INTERPOS_fcntl)))(filedes, cmd, &fl)); } diff --git a/lib/libsys/msync.c b/lib/libsys/msync.c --- a/lib/libsys/msync.c +++ b/lib/libsys/msync.c @@ -41,5 +41,5 @@ msync(void *addr, size_t len, int flags) { return (((int (*)(void *, size_t, int)) - __libsys_interposing[INTERPOS_msync])(addr, len, flags)); + *(__libc_interposing_slot(INTERPOS_msync)))(addr, len, flags)); } diff --git a/lib/libsys/nanosleep.c b/lib/libsys/nanosleep.c --- a/lib/libsys/nanosleep.c +++ b/lib/libsys/nanosleep.c @@ -40,5 +40,5 @@ nanosleep(const struct timespec *rqtp, struct timespec *rmtp) { return (((int (*)(const struct timespec *, struct timespec *)) - __libsys_interposing[INTERPOS_nanosleep])(rqtp, rmtp)); + *(__libc_interposing_slot(INTERPOS_nanosleep)))(rqtp, rmtp)); } diff --git a/lib/libsys/open.c b/lib/libsys/open.c --- a/lib/libsys/open.c +++ b/lib/libsys/open.c @@ -51,6 +51,6 @@ mode = 0; } return (((int (*)(int, const char *, int, ...)) - __libsys_interposing[INTERPOS_openat])(AT_FDCWD, path, flags, - mode)); + *(__libc_interposing_slot(INTERPOS_openat))) + (AT_FDCWD, path, flags, mode)); } diff --git a/lib/libsys/openat.c b/lib/libsys/openat.c --- a/lib/libsys/openat.c +++ b/lib/libsys/openat.c @@ -54,5 +54,6 @@ mode = 0; } return (((int (*)(int, const char *, int, ...)) - __libsys_interposing[INTERPOS_openat])(fd, path, flags, mode)); + *(__libc_interposing_slot(INTERPOS_openat))) + (fd, path, flags, mode)); } diff --git a/lib/libsys/pdfork.c b/lib/libsys/pdfork.c --- a/lib/libsys/pdfork.c +++ b/lib/libsys/pdfork.c @@ -37,6 +37,7 @@ pid_t pdfork(int *fdp, int flags) { - return (((pid_t (*)(int *, int))__libsys_interposing[INTERPOS_pdfork]) + return (((pid_t (*)(int *, int)) + *(__libc_interposing_slot(INTERPOS_pdfork))) (fdp, flags)); } diff --git a/lib/libsys/poll.c b/lib/libsys/poll.c --- a/lib/libsys/poll.c +++ b/lib/libsys/poll.c @@ -40,5 +40,5 @@ poll(struct pollfd pfd[], nfds_t nfds, int timeout) { return (((int (*)(struct pollfd *, nfds_t, int)) - __libsys_interposing[INTERPOS_poll])(pfd, nfds, timeout)); + *(__libc_interposing_slot(INTERPOS_poll)))(pfd, nfds, timeout)); } diff --git a/lib/libsys/ppoll.c b/lib/libsys/ppoll.c --- a/lib/libsys/ppoll.c +++ b/lib/libsys/ppoll.c @@ -41,6 +41,6 @@ timeout, const sigset_t *__restrict newsigmask) { return (((int (*)(struct pollfd *, nfds_t, const struct timespec *, - const sigset_t *)) __libsys_interposing[INTERPOS_ppoll])(pfd, nfds, - timeout, newsigmask)); + const sigset_t *))*(__libc_interposing_slot(INTERPOS_ppoll))) + (pfd, nfds, timeout, newsigmask)); } diff --git a/lib/libsys/pselect.c b/lib/libsys/pselect.c --- a/lib/libsys/pselect.c +++ b/lib/libsys/pselect.c @@ -42,5 +42,5 @@ { return (((int (*)(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *)) - __libsys_interposing[INTERPOS_pselect])(n, rs, ws, es, t, s)); + *(__libc_interposing_slot(INTERPOS_pselect)))(n, rs, ws, es, t, s)); } diff --git a/lib/libsys/read.c b/lib/libsys/read.c --- a/lib/libsys/read.c +++ b/lib/libsys/read.c @@ -41,5 +41,5 @@ read(int fd, void *buf, size_t nbytes) { return (((ssize_t (*)(int, void *, size_t)) - __libsys_interposing[INTERPOS_read])(fd, buf, nbytes)); + *(__libc_interposing_slot(INTERPOS_read)))(fd, buf, nbytes)); } diff --git a/lib/libsys/readv.c b/lib/libsys/readv.c --- a/lib/libsys/readv.c +++ b/lib/libsys/readv.c @@ -42,5 +42,5 @@ readv(int fd, const struct iovec *iov, int iovcnt) { return (((ssize_t (*)(int, const struct iovec *, int)) - __libsys_interposing[INTERPOS_readv])(fd, iov, iovcnt)); + *(__libc_interposing_slot(INTERPOS_readv)))(fd, iov, iovcnt)); } diff --git a/lib/libsys/recv.c b/lib/libsys/recv.c --- a/lib/libsys/recv.c +++ b/lib/libsys/recv.c @@ -44,6 +44,6 @@ */ return (((ssize_t (*)(int, void *, size_t, int, struct sockaddr *, socklen_t *)) - __libsys_interposing[INTERPOS_recvfrom])(s, buf, len, flags, - NULL, NULL)); + *(__libc_interposing_slot(INTERPOS_recvfrom))) + (s, buf, len, flags, NULL, NULL)); } diff --git a/lib/libsys/recvfrom.c b/lib/libsys/recvfrom.c --- a/lib/libsys/recvfrom.c +++ b/lib/libsys/recvfrom.c @@ -43,6 +43,6 @@ { return (((ssize_t (*)(int, void *, size_t, int, struct sockaddr *, socklen_t *)) - __libsys_interposing[INTERPOS_recvfrom])(s, buf, len, flags, - from, fromlen)); + *(__libc_interposing_slot(INTERPOS_recvfrom))) + (s, buf, len, flags, from, fromlen)); } diff --git a/lib/libsys/recvmsg.c b/lib/libsys/recvmsg.c --- a/lib/libsys/recvmsg.c +++ b/lib/libsys/recvmsg.c @@ -41,5 +41,5 @@ recvmsg(int s, struct msghdr *msg, int flags) { return (((int (*)(int, struct msghdr *, int)) - __libsys_interposing[INTERPOS_recvmsg])(s, msg, flags)); + *(__libc_interposing_slot(INTERPOS_recvmsg)))(s, msg, flags)); } diff --git a/lib/libsys/select.c b/lib/libsys/select.c --- a/lib/libsys/select.c +++ b/lib/libsys/select.c @@ -40,5 +40,5 @@ select(int n, fd_set *rs, fd_set *ws, fd_set *es, struct timeval *t) { return (((int (*)(int, fd_set *, fd_set *, fd_set *, struct timeval *)) - __libsys_interposing[INTERPOS_select])(n, rs, ws, es, t)); + *(__libc_interposing_slot(INTERPOS_select)))(n, rs, ws, es, t)); } diff --git a/lib/libsys/send.c b/lib/libsys/send.c --- a/lib/libsys/send.c +++ b/lib/libsys/send.c @@ -44,6 +44,6 @@ */ return (((ssize_t (*)(int, const void *, size_t, int, const struct sockaddr *, socklen_t)) - __libsys_interposing[INTERPOS_sendto])(s, msg, len, flags, + *__libc_interposing_slot(INTERPOS_sendto))(s, msg, len, flags, NULL, 0)); } diff --git a/lib/libsys/sendmsg.c b/lib/libsys/sendmsg.c --- a/lib/libsys/sendmsg.c +++ b/lib/libsys/sendmsg.c @@ -41,5 +41,5 @@ sendmsg(int s, const struct msghdr *msg, int flags) { return (((int (*)(int, const struct msghdr *, int)) - __libsys_interposing[INTERPOS_sendmsg])(s, msg, flags)); + *(__libc_interposing_slot(INTERPOS_sendmsg)))(s, msg, flags)); } diff --git a/lib/libsys/sendto.c b/lib/libsys/sendto.c --- a/lib/libsys/sendto.c +++ b/lib/libsys/sendto.c @@ -43,6 +43,6 @@ { return (((ssize_t (*)(int, const void *, size_t, int, const struct sockaddr *, socklen_t)) - __libsys_interposing[INTERPOS_sendto])(s, msg, len, flags, - to, tolen)); + *(__libc_interposing_slot(INTERPOS_sendto))) + (s, msg, len, flags, to, tolen)); } diff --git a/lib/libsys/setcontext.c b/lib/libsys/setcontext.c --- a/lib/libsys/setcontext.c +++ b/lib/libsys/setcontext.c @@ -43,5 +43,5 @@ setcontext(const ucontext_t *uc) { return (((int (*)(const ucontext_t *)) - __libsys_interposing[INTERPOS_setcontext])(uc)); + *(__libc_interposing_slot(INTERPOS_setcontext)))(uc)); } diff --git a/lib/libsys/sigaction.c b/lib/libsys/sigaction.c --- a/lib/libsys/sigaction.c +++ b/lib/libsys/sigaction.c @@ -41,5 +41,5 @@ sigaction(int sig, const struct sigaction *act, struct sigaction *oact) { return (((int (*)(int, const struct sigaction *, struct sigaction *)) - __libsys_interposing[INTERPOS_sigaction])(sig, act, oact)); + *(__libc_interposing_slot(INTERPOS_sigaction)))(sig, act, oact)); } diff --git a/lib/libsys/sigprocmask.c b/lib/libsys/sigprocmask.c --- a/lib/libsys/sigprocmask.c +++ b/lib/libsys/sigprocmask.c @@ -41,5 +41,5 @@ sigprocmask(int how, const sigset_t *set, sigset_t *oset) { return (((int (*)(int, const sigset_t *, sigset_t *)) - __libsys_interposing[INTERPOS_sigprocmask])(how, set, oset)); + *(__libc_interposing_slot(INTERPOS_sigprocmask)))(how, set, oset)); } diff --git a/lib/libsys/sigsuspend.c b/lib/libsys/sigsuspend.c --- a/lib/libsys/sigsuspend.c +++ b/lib/libsys/sigsuspend.c @@ -41,5 +41,5 @@ sigsuspend(const sigset_t *set) { return (((int (*)(const sigset_t *)) - __libsys_interposing[INTERPOS_sigsuspend])(set)); + *(__libc_interposing_slot(INTERPOS_sigsuspend)))(set)); } diff --git a/lib/libsys/sigtimedwait.c b/lib/libsys/sigtimedwait.c --- a/lib/libsys/sigtimedwait.c +++ b/lib/libsys/sigtimedwait.c @@ -42,5 +42,5 @@ { return (((int (*)(const sigset_t *, siginfo_t *, const struct timespec *)) - __libsys_interposing[INTERPOS_sigtimedwait])(set, info, t)); + *(__libc_interposing_slot(INTERPOS_sigtimedwait)))(set, info, t)); } diff --git a/lib/libsys/sigwait.c b/lib/libsys/sigwait.c --- a/lib/libsys/sigwait.c +++ b/lib/libsys/sigwait.c @@ -33,5 +33,5 @@ sigwait(const sigset_t *set, int *sig) { return (((int (*)(const sigset_t *, int *)) - __libsys_interposing[INTERPOS_sigwait])(set, sig)); + *(__libc_interposing_slot(INTERPOS_sigwait)))(set, sig)); } diff --git a/lib/libsys/sigwaitinfo.c b/lib/libsys/sigwaitinfo.c --- a/lib/libsys/sigwaitinfo.c +++ b/lib/libsys/sigwaitinfo.c @@ -40,5 +40,5 @@ sigwaitinfo(const sigset_t * __restrict set, siginfo_t * __restrict info) { return (((int (*)(const sigset_t *, siginfo_t *)) - __libsys_interposing[INTERPOS_sigwaitinfo])(set, info)); + *(__libc_interposing_slot(INTERPOS_sigwaitinfo)))(set, info)); } diff --git a/lib/libsys/swapcontext.c b/lib/libsys/swapcontext.c --- a/lib/libsys/swapcontext.c +++ b/lib/libsys/swapcontext.c @@ -45,5 +45,5 @@ swapcontext(ucontext_t *oucp, const ucontext_t *ucp) { return (((int (*)(ucontext_t *, const ucontext_t *)) - __libsys_interposing[INTERPOS_swapcontext])(oucp, ucp)); + *(__libc_interposing_slot(INTERPOS_swapcontext)))(oucp, ucp)); } diff --git a/lib/libsys/wait.c b/lib/libsys/wait.c --- a/lib/libsys/wait.c +++ b/lib/libsys/wait.c @@ -44,7 +44,8 @@ __wait(int *istat) { return (((pid_t (*)(pid_t, int *, int, struct rusage *)) - __libsys_interposing[INTERPOS_wait4])(WAIT_ANY, istat, 0, NULL)); + *(__libc_interposing_slot(INTERPOS_wait4))) + (WAIT_ANY, istat, 0, NULL)); } __weak_reference(__wait, wait); diff --git a/lib/libsys/wait3.c b/lib/libsys/wait3.c --- a/lib/libsys/wait3.c +++ b/lib/libsys/wait3.c @@ -44,8 +44,8 @@ __wait3(int *istat, int options, struct rusage *rup) { return (((pid_t (*)(pid_t, int *, int, struct rusage *)) - __libsys_interposing[INTERPOS_wait4])(WAIT_ANY, istat, options, - rup)); + *(__libc_interposing_slot(INTERPOS_wait4))) + (WAIT_ANY, istat, options, rup)); } __weak_reference(__wait3, wait3); diff --git a/lib/libsys/wait4.c b/lib/libsys/wait4.c --- a/lib/libsys/wait4.c +++ b/lib/libsys/wait4.c @@ -40,5 +40,6 @@ wait4(pid_t pid, int *status, int options, struct rusage *ru) { return (((pid_t (*)(pid_t, int *, int, struct rusage *)) - __libsys_interposing[INTERPOS_wait4])(pid, status, options, ru)); + *(__libc_interposing_slot(INTERPOS_wait4))) + (pid, status, options, ru)); } diff --git a/lib/libsys/wait6.c b/lib/libsys/wait6.c --- a/lib/libsys/wait6.c +++ b/lib/libsys/wait6.c @@ -42,6 +42,6 @@ siginfo_t *infop) { return (((pid_t (*)(idtype_t, id_t, int *, int, struct __wrusage *, - siginfo_t *))__libsys_interposing[INTERPOS_wait6])(idtype, id, - status, options, ru, infop)); + siginfo_t *))*(__libc_interposing_slot(INTERPOS_wait6))) + (idtype, id, status, options, ru, infop)); } diff --git a/lib/libsys/waitid.c b/lib/libsys/waitid.c --- a/lib/libsys/waitid.c +++ b/lib/libsys/waitid.c @@ -47,8 +47,8 @@ pid_t ret; ret = ((pid_t (*)(idtype_t, id_t, int *, int, struct __wrusage *, - siginfo_t *))__libsys_interposing[INTERPOS_wait6])(idtype, id, - &status, flags, NULL, info); + siginfo_t *))*(__libc_interposing_slot(INTERPOS_wait6))) + (idtype, id, &status, flags, NULL, info); /* * According to SUSv4, waitid() shall not return a PID when a diff --git a/lib/libsys/waitpid.c b/lib/libsys/waitpid.c --- a/lib/libsys/waitpid.c +++ b/lib/libsys/waitpid.c @@ -44,7 +44,8 @@ __waitpid(pid_t pid, int *istat, int options) { return (((pid_t (*)(pid_t, int *, int, struct rusage *)) - __libsys_interposing[INTERPOS_wait4])(pid, istat, options, NULL)); + *(__libc_interposing_slot(INTERPOS_wait4))) + (pid, istat, options, NULL)); } __weak_reference(__waitpid, waitpid); diff --git a/lib/libsys/write.c b/lib/libsys/write.c --- a/lib/libsys/write.c +++ b/lib/libsys/write.c @@ -41,5 +41,5 @@ write(int fd, const void *buf, size_t nbytes) { return (((ssize_t (*)(int, const void *, size_t)) - __libsys_interposing[INTERPOS_write])(fd, buf, nbytes)); + *(__libc_interposing_slot(INTERPOS_write)))(fd, buf, nbytes)); } diff --git a/lib/libsys/writev.c b/lib/libsys/writev.c --- a/lib/libsys/writev.c +++ b/lib/libsys/writev.c @@ -42,5 +42,5 @@ writev(int fd, const struct iovec *iov, int iovcnt) { return (((ssize_t (*)(int, const struct iovec *, int)) - __libsys_interposing[INTERPOS_writev])(fd, iov, iovcnt)); + *(__libc_interposing_slot(INTERPOS_writev)))(fd, iov, iovcnt)); }