[PATCH v4 4/5] libc: Added the prototype for ppoll()

Corinna Vinschen vinschen@redhat.com
Mon Jun 23 15:04:53 GMT 2025


On Jun 23 17:42, Mazen Adel Elmessady wrote:
> Added prototype of ppoll() to
> newlib/libc/sys/rtems/include/sys/poll.h
> ---
>  newlib/libc/sys/rtems/include/sys/poll.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/newlib/libc/sys/rtems/include/sys/poll.h b/newlib/libc/sys/rtems/include/sys/poll.h
> index cc6ad49db..f811eeba4 100644
> --- a/newlib/libc/sys/rtems/include/sys/poll.h
> +++ b/newlib/libc/sys/rtems/include/sys/poll.h
> @@ -35,6 +35,10 @@
>  
>  #include <sys/cdefs.h>
>  
> +#if __POSIX_VISIBLE >= 202405

Shouldn't this #if check for __GNU_VISIBLE as well?

> +#include <signal.h>
> +#endif
> +
>  /*
>   * This file is intended to be compatible with the traditional poll.h.
>   */
> @@ -100,6 +104,11 @@ struct pollfd {
>  
>  __BEGIN_DECLS
>  int	poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout);
> +#if (__GNU_VISIBLE || __POSIX_VISIBLE >= 202405)
> +int	ppoll(struct pollfd _pfd[], nfds_t _nfds,
> +	    const struct timespec *__restrict _timeout,
> +	    const sigset_t *__restrict _newsigmask);
> +#endif /* __GNU_VISIBLE || __POSIX_VISIBLE >= 202405 */
>  __END_DECLS
>  
>  #endif /* !_KERNEL */
> -- 
> 2.48.1



More information about the Newlib mailing list