mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-26 23:10:06 +00:00
2e274cd8c1
Similar to ppoll, the poll.h header needs to redirect the poll call to a proper fortified ppoll with 64 bit time_t support. The implementation is straightforward, just need to add a similar check as __poll_chk and call the 64 bit time_t ppoll version. The debug fortify tests are also extended to cover 64 bit time_t for affected ABIs. Unfortunately it requires an aditional symbol, which makes backport tricky. One possibility is to add a static inline version if compiler supports is and call abort instead of __chk_fail, so fortified version will call __poll64 in the end. Another possibility is to just remove the fortify support for _TIME_BITS=64. Checked on i686-linux-gnu.
26 lines
592 B
C
26 lines
592 B
C
#ifndef _SYS_POLL_H
|
|
# include <io/sys/poll.h>
|
|
|
|
#ifndef _ISOMAC
|
|
#include <include/struct___timespec64.h>
|
|
|
|
extern int __poll (struct pollfd *__fds, unsigned long int __nfds,
|
|
int __timeout);
|
|
libc_hidden_proto (__poll)
|
|
libc_hidden_proto (ppoll)
|
|
|
|
# if __TIMESIZE == 64
|
|
# define __ppoll64 ppoll
|
|
# define __ppoll64_chk __ppoll_chk
|
|
# else
|
|
# include <time.h>
|
|
# include <signal.h>
|
|
|
|
extern int __ppoll64 (struct pollfd *fds, nfds_t nfds,
|
|
const struct __timespec64 *timeout,
|
|
const sigset_t *sigmask);
|
|
libc_hidden_proto (__ppoll64)
|
|
# endif
|
|
#endif
|
|
#endif
|