mirror of https://github.com/wolfSSL/wolfssl.git
autoconf: build wolfevent.c under --enable-usersettings
wolfevent.c (the wolfEvent completion queue) only compiled under --enable-asynccrypt: AM_CONDITIONAL([BUILD_WOLFEVENT],...) tested only ENABLED_ASYNCCRYPT. But HAVE_WOLF_EVENT is a user-settable macro that internal.c/ssl.c gate their wolfEventQueue_* references on, so a --enable-usersettings build that defines HAVE_WOLF_EVENT referenced the queue API while the object was never built -> link error (undefined wolfEventQueue_Init/Free). BUILD_WOLFEVENT was also the only BUILD_* conditional missing the standard "|| ENABLED_USERSETTINGS = yes" escape hatch that lets a header-driven build compile a source and defer the decision to the file's own #ifdef. Add that clause (matching BUILD_FALCON/BUILD_MLKEM/etc.) so usersettings builds compile wolfevent.c; its internal #ifdef HAVE_WOLF_EVENT still gates whether the code is active, so non-event builds get an empty object. Also silence wolfEvent_Poll's unused-parameter -Werror in non-async builds (event/flags are consumed only by the async hardware poll), which the above change surfaces now that the file compiles without WOLFSSL_ASYNC_CRYPT.pull/11002/head
parent
d97ca01066
commit
f0c28b84ea
|
|
@ -13092,7 +13092,7 @@ AM_COND_IF([BUILD_SP_INT], [INCLUDE_SP_INT="yes"])
|
|||
AC_SUBST([INCLUDE_SP_INT])
|
||||
AM_CONDITIONAL([BUILD_MCAPI],[test "x$ENABLED_MCAPI" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_ASYNCCRYPT],[test "x$ENABLED_ASYNCCRYPT" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_WOLFEVENT],[test "x$ENABLED_ASYNCCRYPT" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_WOLFEVENT],[test "x$ENABLED_ASYNCCRYPT" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_CRYPTOCB],[test "x$ENABLED_CRYPTOCB" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_SWDEV],[test "x$ENABLED_SWDEV" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_PSK],[test "x$ENABLED_PSK" = "xyes"])
|
||||
|
|
|
|||
|
|
@ -51,6 +51,14 @@ int wolfEvent_Poll(WOLF_EVENT* event, WOLF_EVENT_FLAG flags)
|
|||
{
|
||||
int ret = WC_NO_ERR_TRACE(BAD_COND_E);
|
||||
|
||||
/* event/flags are only consumed by the async hardware poll below, which is
|
||||
* compiled out in non-async builds (the event queue core is
|
||||
* async-independent). */
|
||||
#ifndef WOLFSSL_ASYNC_CRYPT
|
||||
(void)event;
|
||||
(void)flags;
|
||||
#endif
|
||||
|
||||
/* Check hardware */
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
if (event->type >= WOLF_EVENT_TYPE_ASYNC_FIRST &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue