mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
libev: libevent conflicts at buildtime
This commit is contained in:
parent
73b0147b40
commit
ff2f5f601d
5 changed files with 19 additions and 8 deletions
|
@ -118,7 +118,8 @@ if(LWS_WITH_DISTRO_RECOMMENDED)
|
|||
set(LWS_WITH_SERVER_STATUS 1)
|
||||
set(LWS_WITH_LIBUV 1)
|
||||
set(LWS_WITH_LIBEV 1)
|
||||
set(LWS_WITH_LIBEVENT 1)
|
||||
# libev + libevent cannot coexist at build-time
|
||||
set(LWS_WITH_LIBEVENT 0)
|
||||
set(LWS_WITHOUT_EXTENSIONS 0)
|
||||
endif()
|
||||
|
||||
|
@ -428,6 +429,10 @@ if (LWS_WITH_SQLITE3)
|
|||
endif()
|
||||
|
||||
|
||||
if (LWS_WITH_LIBEV AND LWS_WITH_LIBEVENT)
|
||||
message(FATAL_ERROR "Sorry libev and libevent conflict with each others' namespace, you can only have one or the other")
|
||||
endif()
|
||||
|
||||
# The base dir where the test-apps look for the SSL certs.
|
||||
set(LWS_OPENSSL_CLIENT_CERTS ../share CACHE PATH "Server SSL certificate directory")
|
||||
if (WIN32)
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#define LWS_HIDE_LIBEVENT
|
||||
|
||||
#include "private-libwebsockets.h"
|
||||
|
||||
void lws_feature_status_libev(struct lws_context_creation_info *info)
|
||||
|
|
|
@ -162,7 +162,7 @@ typedef unsigned long long lws_intptr_t;
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef LWS_WITH_LIBEV
|
||||
#if defined(LWS_WITH_LIBEV)
|
||||
#include <ev.h>
|
||||
#endif /* LWS_WITH_LIBEV */
|
||||
#ifdef LWS_WITH_LIBUV
|
||||
|
@ -171,7 +171,7 @@ typedef unsigned long long lws_intptr_t;
|
|||
#include <uv-version.h>
|
||||
#endif
|
||||
#endif /* LWS_WITH_LIBUV */
|
||||
#ifdef LWS_WITH_LIBEVENT
|
||||
#if defined(LWS_WITH_LIBEVENT) && !defined(LWS_HIDE_LIBEVENT)
|
||||
#include <event2/event.h>
|
||||
#endif /* LWS_WITH_LIBEVENT */
|
||||
|
||||
|
@ -4324,7 +4324,7 @@ lws_plat_recommended_rsa_bits(void);
|
|||
*/
|
||||
///@{
|
||||
|
||||
#ifdef LWS_WITH_LIBEV
|
||||
#if defined(LWS_WITH_LIBEV)
|
||||
typedef void (lws_ev_signal_cb_t)(EV_P_ struct ev_signal *w, int revents);
|
||||
|
||||
LWS_VISIBLE LWS_EXTERN int
|
||||
|
@ -4383,7 +4383,7 @@ lws_close_all_handles_in_loop(uv_loop_t *loop);
|
|||
*/
|
||||
///@{
|
||||
|
||||
#ifdef LWS_WITH_LIBEVENT
|
||||
#if defined(LWS_WITH_LIBEVENT) && !defined(LWS_HIDE_LIBEVENT)
|
||||
typedef void (lws_event_signal_cb_t) (evutil_socket_t sock_fd, short revents,
|
||||
void *ctx);
|
||||
|
||||
|
|
|
@ -168,13 +168,13 @@ int fork(void);
|
|||
#include <arpa/inet.h>
|
||||
#include <poll.h>
|
||||
#endif
|
||||
#ifdef LWS_WITH_LIBEV
|
||||
#if defined(LWS_WITH_LIBEV)
|
||||
#include <ev.h>
|
||||
#endif
|
||||
#ifdef LWS_WITH_LIBUV
|
||||
#include <uv.h>
|
||||
#endif
|
||||
#ifdef LWS_WITH_LIBEVENT
|
||||
#if defined(LWS_WITH_LIBEVENT) && !defined(LWS_HIDE_LIBEVENT)
|
||||
#include <event2/event.h>
|
||||
#endif
|
||||
|
||||
|
@ -1102,7 +1102,11 @@ struct lws_context {
|
|||
uv_loop_t pu_loop;
|
||||
#endif
|
||||
#if defined(LWS_WITH_LIBEVENT)
|
||||
#if defined(LWS_HIDE_LIBEVENT)
|
||||
void * lws_event_sigint_cb;
|
||||
#else
|
||||
lws_event_signal_cb_t * lws_event_sigint_cb;
|
||||
#endif
|
||||
#endif
|
||||
char canonical_hostname[128];
|
||||
#ifdef LWS_LATENCY
|
||||
|
|
|
@ -127,7 +127,7 @@ test_server_fops_open(const struct lws_plat_file_ops *fops,
|
|||
/* call through to original platform implementation */
|
||||
n = fops_plat.open(fops, vfs_path, vpath, flags);
|
||||
|
||||
lwsl_notice("%s: opening %s, ret %p\n", __func__, vfs_path, n);
|
||||
lwsl_debug("%s: opening %s, ret %p\n", __func__, vfs_path, n);
|
||||
|
||||
return n;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue