[packages] ndisc: update to 1.0.2, package rltraceroute6 (#8153), refresh patches
[packages.git] / ipv6 / ndisc / patches / 120-ppoll.patch
1 --- a/compat/fixups.h
2 +++ b/compat/fixups.h
3 @@ -50,13 +50,25 @@ int inet6_rth_add (void *bp, const struc
4  # define IPV6_RTHDR_TYPE_0 0
5  #endif
6  
7 -#ifndef HAVE_PPOLL
8 +#include <sys/poll.h>
9 +
10 +#ifdef HAVE_PPOLL
11 +static inline int
12 +compat_ppoll (struct pollfd *restrict fds, int n,
13 +              const struct timespec *restrict ts,
14 +              const sigset_t *restrict sigmask)
15 +{
16 +       return ppoll(fds, n, ts, sigmask);
17 +}
18 +
19 +#else
20  # include <signal.h>
21  struct pollfd;
22  struct timespec;
23  
24 -int ppoll (struct pollfd *restrict fds, int n,
25 -           const struct timespec *restrict ts,
26 -           const sigset_t *restrict sigmask);
27 +int compat_ppoll (struct pollfd *restrict fds, int n,
28 +                  const struct timespec *restrict ts,
29 +                  const sigset_t *restrict sigmask);
30  #endif
31  
32 +#define ppoll compat_ppoll
33 --- a/compat/ppoll.c
34 +++ b/compat/ppoll.c
35 @@ -32,9 +32,9 @@
36  # include <pthread.h> // sigprocmask is not thread-safe
37  #endif
38  
39 -int ppoll (struct pollfd *restrict fds, int n,
40 -           const struct timespec *restrict ts,
41 -           const sigset_t *restrict sigset)
42 +int compat_ppoll (struct pollfd *restrict fds, int n,
43 +                  const struct timespec *restrict ts,
44 +                  const sigset_t *restrict sigset)
45  {
46         sigset_t origset;
47         int timeout;