libuwsc: fix compiltation with wolfSSL
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Fri, 15 Jul 2022 18:00:20 +0000 (15:00 -0300)
committerRosen Penev <rosenp@gmail.com>
Fri, 15 Jul 2022 20:15:54 +0000 (13:15 -0700)
wolfssl/options.h needs to be included before the other wolfssl headers
to enable OpenSSL API required to build the package.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 8fb3fd3dac586ccb38a3a30aa4d0e1656aea2dc3)

libs/libuwsc/patches/100-cmake-fix-wolfssl-detection.patch [new file with mode: 0644]

diff --git a/libs/libuwsc/patches/100-cmake-fix-wolfssl-detection.patch b/libs/libuwsc/patches/100-cmake-fix-wolfssl-detection.patch
new file mode 100644 (file)
index 0000000..7f63f33
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/src/ssl.c
++++ b/src/ssl.c
+@@ -54,6 +54,7 @@ struct uwsc_ssl_ctx {
+ #include <openssl/err.h>
+ #elif UWSC_HAVE_WOLFSSL
+ #define WC_NO_HARDEN
++#include <wolfssl/options.h>
+ #include <wolfssl/openssl/ssl.h>
+ #include <wolfssl/openssl/err.h>
+ #endif