Fix eloop-bench to work on Solaris.
#include <unistd.h>
/* config.h should define HAVE_KQUEUE, HAVE_EPOLL, etc. */
-#ifdef HAVE_CONFIG_H
+#if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_H)
#include "config.h"
#endif
/* Assume BSD has a working sys/queue.h and kqueue(2) interface. */
#define HAVE_SYS_QUEUE_H
#define HAVE_KQUEUE
-#elif defined(__linux__)
-/* Assume Linux has a working epoll(3) interface. */
+#elif defined(__linux__) || defined(__sun)
+/* Assume Linux and Solaris have a working epoll(3) interface. */
#define HAVE_EPOLL
#else
/* pselect(2) is a POSIX standard. */
CSTD?= c99
CFLAGS+= -std=${CSTD}
-CPPFLAGS= -I${TOP} -I${TOP}/src -I${TOP}/compat
+CPPFLAGS+= -DNO_CONFIG_H
+CPPFLAGS+= -I${TOP} -I${TOP}/src -I${TOP}/compat
# Default is to let eloop decide
#CPPFLAGS+= -DHAVE_KQUEUE
#CPPFLAGS+= -DHAVE_EPOLL
#CPPFLAGS+= -DHAVE_PPOLL
-OBJS+= ${SRCS:.c=.o}
+OBJS+= ${SRCS:.c=.o}
.c.o: Makefile
${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@