ndisc: fix ppoll mismatch against libc
git-svn-id: svn://svn.openwrt.org/openwrt/packages@16192 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b78de2f875
commit
0cb6ce0b94
47
ipv6/ndisc/patches/120-ppoll.patch
Normal file
47
ipv6/ndisc/patches/120-ppoll.patch
Normal file
@ -0,0 +1,47 @@
|
||||
--- a/compat/fixups.h
|
||||
+++ b/compat/fixups.h
|
||||
@@ -50,13 +50,25 @@
|
||||
# define IPV6_RTHDR_TYPE_0 0
|
||||
#endif
|
||||
|
||||
-#ifndef HAVE_PPOLL
|
||||
+#include <sys/poll.h>
|
||||
+
|
||||
+#ifdef HAVE_PPOLL
|
||||
+static inline int
|
||||
+compat_ppoll (struct pollfd *restrict fds, int n,
|
||||
+ const struct timespec *restrict ts,
|
||||
+ const sigset_t *restrict sigmask)
|
||||
+{
|
||||
+ return ppoll(fds, n, ts, sigmask);
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
# include <signal.h>
|
||||
struct pollfd;
|
||||
struct timespec;
|
||||
|
||||
-int ppoll (struct pollfd *restrict fds, int n,
|
||||
- const struct timespec *restrict ts,
|
||||
- const sigset_t *restrict sigmask);
|
||||
+int compat_ppoll (struct pollfd *restrict fds, int n,
|
||||
+ const struct timespec *restrict ts,
|
||||
+ const sigset_t *restrict sigmask);
|
||||
#endif
|
||||
|
||||
+#define ppoll compat_ppoll
|
||||
--- a/compat/ppoll.c
|
||||
+++ b/compat/ppoll.c
|
||||
@@ -32,9 +32,9 @@
|
||||
# include <pthread.h> // sigprocmask is not thread-safe
|
||||
#endif
|
||||
|
||||
-int ppoll (struct pollfd *restrict fds, int n,
|
||||
- const struct timespec *restrict ts,
|
||||
- const sigset_t *restrict sigset)
|
||||
+int compat_ppoll (struct pollfd *restrict fds, int n,
|
||||
+ const struct timespec *restrict ts,
|
||||
+ const sigset_t *restrict sigset)
|
||||
{
|
||||
sigset_t origset;
|
||||
int val;
|
Loading…
x
Reference in New Issue
Block a user