From 75b95fa25df74fcd0498bf59e3524f20f594755d Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 22 Sep 2023 18:27:54 +0200 Subject: Add more __diagnose_as_builtin annotations --- include/poll.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/poll.h') diff --git a/include/poll.h b/include/poll.h index 8e8de6c..8831f95 100644 --- a/include/poll.h +++ b/include/poll.h @@ -31,6 +31,9 @@ extern "C" { #undef poll +#if __has_builtin(__builtin_poll) +__diagnose_as_builtin(__builtin_poll, 1, 2, 3) +#endif _FORTIFY_FN(poll) int poll(struct pollfd * _FORTIFY_POS0 __f, nfds_t __n, int __s) { size_t __b = __bos(__f, 0); @@ -42,6 +45,9 @@ _FORTIFY_FN(poll) int poll(struct pollfd * _FORTIFY_POS0 __f, nfds_t __n, int __ #if defined(_GNU_SOURCE) && !_REDIR_TIME64 #undef ppoll +#if __has_builtin(__builtin_ppoll) +__diagnose_as_builtin(__builtin_ppoll, 1, 2, 3, 4) +#endif _FORTIFY_FN(ppoll) int ppoll(struct pollfd * _FORTIFY_POS0 __f, nfds_t __n, const struct timespec *__s, const sigset_t *__m) { -- cgit v1.3