> cc -fPIC -Wall -I. -O2 -g -lpthread -c -o urcu-defer.o `echo urcu-defer.c urcu-defer.h | sed 's/[^ ]*\.h//g'`
> In file included from urcu-defer.c:31:
> /usr/include/linux/futex.h:96: error: expected ‘)’ before ‘*’ token
> /usr/include/linux/futex.h:100: error: expected ‘)’ before ‘*’ token
Seems broken on ppc. Just for two defines, it's not worth depending on it.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
#include <string.h>
#include <errno.h>
#include <poll.h>
-#include <linux/futex.h>
#include <sys/time.h>
#include <syscall.h>
#include <unistd.h>
#include "urcu-defer.h"
#define futex(...) syscall(__NR_futex, __VA_ARGS__)
+#define FUTEX_WAIT 0
+#define FUTEX_WAKE 1
void __attribute__((destructor)) urcu_defer_exit(void);