From: Marko Kreen Date: Fri, 16 Jan 2009 13:36:21 +0000 (+0000) Subject: event_loopbreak compat for libevent 1.3 X-Git-Tag: pgbouncer_1_3_rc1~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af5fce3de41b778783e5f7a941d2bc0b8c785877;p=pgbouncer event_loopbreak compat for libevent 1.3 --- diff --git a/configure.ac b/configure.ac index 103945a..a650b64 100644 --- a/configure.ac +++ b/configure.ac @@ -174,6 +174,8 @@ AC_EGREP_CPP([HTTP_SERVUNAVAIL], [AC_MSG_ERROR([no, cannot proceed])], [AC_MSG_RESULT([yes])]) +AC_CHECK_FUNCS(event_loopbreak) + # autoconf does not want to find 'install', if not using automake... INSTALL=install diff --git a/include/system.h b/include/system.h index 146a52b..02223f0 100644 --- a/include/system.h +++ b/include/system.h @@ -193,5 +193,10 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); static inline int lstat(const char *path, struct stat *st) { return stat(path, st); } #endif +/* libevent 1.3 does not have event_loopbreak() */ +#ifndef HAVE_EVENT_LOOPBREAK +static inline void event_loopbreak(void) { } +#endif + void change_user(const char *user);