From 24cac1c1bcf4b0dc3188f72934d2881692829e61 Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Sat, 15 Jan 2011 19:46:55 -0500 Subject: bufferevent compiler-flag fix regarding >= 2.0 ... must rebuild between 1.4 and 2.0 version builds --- src/buffer_event.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/buffer_event.c b/src/buffer_event.c index 4e20353..7f1ab9b 100644 --- a/src/buffer_event.c +++ b/src/buffer_event.c @@ -201,8 +201,13 @@ static int buffer_event_get_timeouts(lua_State* L) { le_bufferevent* ev = buffer_event_get(L, 1); if(!ev->ev) return 0; +#if LIBEVENT_VERSION_NUMBER >= 0x02000000 + lua_pushinteger(L, (ev->ev->timeout_read).tv_sec); + lua_pushinteger(L, (ev->ev->timeout_write).tv_sec); +#else lua_pushinteger(L, ev->ev->timeout_read); lua_pushinteger(L, ev->ev->timeout_write); +#endif return 2; } -- cgit v1.2.3