Commit 0a78c370 authored by vvaltman's avatar vvaltman

fixes for libevent 1.4

parent 0200b514
#ifndef __EVENT_OLD_H__
#define __EVENT_OLD_H__
#include <assert.h>
#define BEV_EVENT_READ EVBUFFER_READ
#define BEV_EVENT_WRITE EVBUFFER_WRITE
#define BEV_EVENT_EOF EVBUFFER_EOF
#define BEV_EVENT_ERROR EVBUFFER_ERROR
#define BEV_EVENT_TIMEOUT EVBUFFER_TIMEOUT
typedef int evutil_socket_t;
static inline struct event *event_new (struct event_base *base, int fd, int what, void(*callback)(int, short, void *), void *arg) __attribute__ ((unused));
......@@ -24,4 +32,12 @@ static void event_free (struct event *ev) {
event_del (ev);
free (ev);
}
static struct bufferevent *bufferevent_socket_new (struct event_base *base, int fd, int flags) __attribute__ ((unused));
static struct bufferevent *bufferevent_socket_new (struct event_base *base, int fd, int flags) {
assert (!flags);
struct bufferevent *bev = bufferevent_new(fd, 0, 0, 0, 0);
bufferevent_base_set (base, bev);
return bev;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment