From: Niels Provos Date: Mon, 19 Oct 2009 16:20:12 +0000 (+0000) Subject: Fix compilation for listener.h for C++ - missing extern "C". Patch from Ferenc Szalai. X-Git-Tag: release-2.0.3-alpha~96 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1c9b84ae6ae5de9fa03a8028a7336f65c5a1d61;p=libevent Fix compilation for listener.h for C++ - missing extern "C". Patch from Ferenc Szalai. svn:r1448 --- diff --git a/ChangeLog b/ChangeLog index b638bf57..b844de5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,7 @@ Changes in 2.0.3-alpha: o When adding or deleting an event from a non-main thread, only wake up the main thread when its behavior actually needs to change. o Fix some bugs when using the old evdns interfaces to initialize the evdns module. o Detect errors during bufferevent_connect(). Patch from Christopher Davis. + o Fix compilation for listener.h for C++ - missing extern "C". Patch from Ferenc Szalai. Changes in 2.0.2-alpha: diff --git a/include/event2/listener.h b/include/event2/listener.h index 9edf5991..e4fcec00 100644 --- a/include/event2/listener.h +++ b/include/event2/listener.h @@ -27,6 +27,10 @@ #ifndef _EVENT2_LISTENER_H_ #define _EVENT2_LISTENER_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include struct sockaddr; @@ -108,4 +112,8 @@ struct event_base *evconnlistener_get_base(struct evconnlistener *lev); /** Return the socket that an evconnlistner is listening on. */ evutil_socket_t evconnlistener_get_fd(struct evconnlistener *lev); +#ifdef __cplusplus +} +#endif + #endif