mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
Linux: Add ppoll fortify symbol for 64 bit time_t (BZ# 29746)
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.
This commit is contained in:
@@ -67,7 +67,7 @@ __ppoll64 (struct pollfd *fds, nfds_t nfds, const struct __timespec64 *timeout,
|
||||
libc_hidden_def (__ppoll64)
|
||||
|
||||
int
|
||||
__ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
|
||||
ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
|
||||
const sigset_t *sigmask)
|
||||
{
|
||||
struct __timespec64 ts64;
|
||||
@@ -77,5 +77,4 @@ __ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
|
||||
return __ppoll64 (fds, nfds, timeout ? &ts64 : NULL, sigmask);
|
||||
}
|
||||
#endif
|
||||
strong_alias (__ppoll, ppoll)
|
||||
libc_hidden_def (ppoll)
|
||||
|
||||
Reference in New Issue
Block a user