From 0d8829d380af5a6fa909a37fb26ba88867e69a81 Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 18 Sep 2009 15:11:12 -0500 Subject: [PATCH] Fixed relay_old.c by providing ppoll(). * runtime/staprun/staprun.h: Put ppoll() declaration here (so that relay_old.c can use it). * runtime/staprun/relay.c (ppoll): Made ppoll() non-static so that relay_old.c can use it. --- runtime/staprun/relay.c | 11 ++--------- runtime/staprun/staprun.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/runtime/staprun/relay.c b/runtime/staprun/relay.c index 0c0092356..59d7ac9a7 100644 --- a/runtime/staprun/relay.c +++ b/runtime/staprun/relay.c @@ -22,16 +22,9 @@ static time_t *time_backlog[NR_CPUS]; static int backlog_order=0; #define BACKLOG_MASK ((1 << backlog_order) - 1) -/* - * ppoll exists in glibc >= 2.4 - */ -#if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 4)) -#define NEED_PPOLL -#endif - #ifdef NEED_PPOLL -static int ppoll(struct pollfd *fds, nfds_t nfds, - const struct timespec *timeout, const sigset_t *sigmask) +int ppoll(struct pollfd *fds, nfds_t nfds, + const struct timespec *timeout, const sigset_t *sigmask) { sigset_t origmask; int ready; diff --git a/runtime/staprun/staprun.h b/runtime/staprun/staprun.h index 1dcfabbe4..f9f01003f 100644 --- a/runtime/staprun/staprun.h +++ b/runtime/staprun/staprun.h @@ -186,3 +186,13 @@ extern int out_fd[NR_CPUS]; /* relay_old uses these. Set in ctl.c */ extern unsigned subbuf_size; extern unsigned n_subbufs; + +/* + * ppoll exists in glibc >= 2.4 + */ +#if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 4)) +#define NEED_PPOLL + +extern int ppoll(struct pollfd *fds, nfds_t nfds, + const struct timespec *timeout, const sigset_t *sigmask); +#endif -- 2.43.5