aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Harning Jr <harningt@gmail.com>2011-01-15 19:46:55 -0500
committerThomas Harning Jr <harningt@gmail.com>2011-01-15 19:46:55 -0500
commit24cac1c1bcf4b0dc3188f72934d2881692829e61 (patch)
treec96249f8e38574fefbd9252f2a56526f776b4e1e
parent6a0484672751e17fbd8d410335be658528999528 (diff)
downloadluaevent-prosody-24cac1c1bcf4b0dc3188f72934d2881692829e61.tar.gz
luaevent-prosody-24cac1c1bcf4b0dc3188f72934d2881692829e61.zip
bufferevent compiler-flag fix regarding >= 2.0 ... must rebuild between 1.4 and 2.0 version builds
-rw-r--r--src/buffer_event.c5
1 files changed, 5 insertions, 0 deletions
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;
}