summaryrefslogtreecommitdiff
path: root/include/poll.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/poll.h')
-rw-r--r--include/poll.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/poll.h b/include/poll.h
index 6ca08a7..d9b602c 100644
--- a/include/poll.h
+++ b/include/poll.h
@@ -27,25 +27,25 @@ extern "C" {
27 27
28#undef poll 28#undef poll
29 29
30fortify_fn(poll) int poll(struct pollfd *fds, nfds_t nfds, int timeout) 30_FORTIFY_FN(poll) int poll(struct pollfd *__f, nfds_t __n, int __s)
31{ 31{
32 __typeof__(sizeof 0) bos = __builtin_object_size(fds, 0); 32 __typeof__(sizeof 0) __b = __builtin_object_size(__f, 0);
33 33
34 if (nfds > bos / sizeof(struct pollfd)) 34 if (__n > __b / sizeof(struct pollfd))
35 __builtin_trap(); 35 __builtin_trap();
36 return __orig_poll(fds, nfds, timeout); 36 return __orig_poll(__f, __n, __s);
37} 37}
38 38
39#ifdef _GNU_SOURCE 39#ifdef _GNU_SOURCE
40#undef ppoll 40#undef ppoll
41fortify_fn(ppoll) int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, 41_FORTIFY_FN(ppoll) int ppoll(struct pollfd *__f, nfds_t __n, const struct timespec *__s,
42 const sigset_t *mask) 42 const sigset_t *__m)
43{ 43{
44 __typeof__(sizeof 0) bos = __builtin_object_size(fds, 0); 44 __typeof__(sizeof 0) __b = __builtin_object_size(__f, 0);
45 45
46 if (nfds > bos / sizeof(struct pollfd)) 46 if (__n > __b / sizeof(struct pollfd))
47 __builtin_trap(); 47 __builtin_trap();
48 return __orig_ppoll(fds, nfds, timeout, mask); 48 return __orig_ppoll(__f, __n, __s, __m);
49} 49}
50#endif 50#endif
51 51