From: Felix Fietkau Date: Fri, 29 May 2009 12:01:34 +0000 (+0000) Subject: ndisc: fix ppoll mismatch against libc X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=58a5645842cbf5f36988b0d76fa6c0741ba2910b;ds=sidebyside ndisc: fix ppoll mismatch against libc SVN-Revision: 16192 --- diff --git a/ipv6/ndisc/patches/120-ppoll.patch b/ipv6/ndisc/patches/120-ppoll.patch new file mode 100644 index 0000000000..6a54770856 --- /dev/null +++ b/ipv6/ndisc/patches/120-ppoll.patch @@ -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 ++ ++#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 + 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 // 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;