Skip to content

Commit 52bb641

Browse files
committed
Refactor: Make the libevent logic only compile if libevent is enabled ..
1 parent 0cf8257 commit 52bb641

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

configure.ac

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8436,6 +8436,10 @@ then
84368436
AM_CFLAGS="$AM_CFLAGS -DHAVE_EXT_CACHE -DHAVE_MEMCACHED"
84378437
fi
84388438
8439+
if test "$ENABLED_LIBEVENT" = "yes"
8440+
then
8441+
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_LIBEVENT"
8442+
fi
84398443
84408444
if test "$ENABLED_NGINX" = "yes"|| test "x$ENABLED_HAPROXY" = "xyes" || test "x$ENABLED_LIGHTY" = "xyes"
84418445
then

wolfssl/openssl/ssl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@
132132
#if !defined(OPENSSL_COEXIST) && \
133133
(defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
134134

135+
#ifdef WOLFSSL_LIBEVENT
135136
/* OpenSSL struct tag compatibility: third-party code (e.g. libevent) may
136-
* forward-declare or reference the OpenSSL internal struct tags directly
137-
`. */
137+
* forward-declare or reference the OpenSSL internal struct tags directly. */
138138
#define ssl_st WOLFSSL
139139
#define ssl_ctx_st WOLFSSL_CTX
140140
#define ssl_method_st WOLFSSL_METHOD
@@ -146,6 +146,7 @@
146146
#define bio_method_st WOLFSSL_BIO_METHOD
147147
#define buf_mem_st WOLFSSL_BUF_MEM
148148
#define evp_pkey_st WOLFSSL_EVP_PKEY
149+
#endif /* WOLFSSL_LIBEVENT */
149150

150151
typedef WOLFSSL SSL;
151152
typedef WOLFSSL_SESSION SSL_SESSION;

0 commit comments

Comments
 (0)