Files
haikuports/dev-libs/wolfssl/patches/wolfssl-5.6.3.patch
2023-10-30 07:24:20 +01:00

75 lines
2.3 KiB
Diff

diff --git a/configure.ac b/configure.ac
index 26e7a75..cdc005a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8726,7 +8726,7 @@ echo "" >> $OPTION_FILE
# check for supported command to trim option with
if colrm >/dev/null 2>&1 </dev/null; then
TRIM="colrm 3"
-elif cut >/dev/null 2>&1 </dev/null; then
+elif cut --version >/dev/null 2>&1 </dev/null; then
TRIM="cut -c1-2"
else
AC_MSG_ERROR([Could not find colrm or cut to make options file])
diff --git a/src/ssl.c b/src/ssl.c
index fb8ee5c..fa20aef 100644
--- a/src/ssl.c
+++ b/src/ssl.c
@@ -14404,7 +14404,7 @@ int wolfSSL_Cleanup(void)
SessionCache[i].lock_valid = 0;
}
#else
- if ((session_lock_valid == 1) && (wc_UnLockRwLock(&session_lock) != 0)) {
+ if ((session_lock_valid == 1) && (wc_FreeRwLock(&session_lock) != 0)) {
if (ret == WOLFSSL_SUCCESS)
ret = BAD_MUTEX_E;
}
diff --git a/wolfcrypt/src/misc.c b/wolfcrypt/src/misc.c
index f80c9c6..9d2aa86 100644
--- a/wolfcrypt/src/misc.c
+++ b/wolfcrypt/src/misc.c
@@ -397,11 +397,13 @@ WC_MISC_STATIC WC_INLINE int ConstantCompare(const byte* a, const byte* b,
#if defined(HAVE_FIPS) && !defined(min) /* so ifdef check passes */
#define min min
#endif
+ #if defined(HAVE_FIPS) || !defined(min)
/* returns the smaller of a and b */
WC_MISC_STATIC WC_INLINE word32 min(word32 a, word32 b)
{
return a > b ? b : a;
}
+ #endif
#endif /* !WOLFSSL_HAVE_MIN */
#ifndef WOLFSSL_HAVE_MAX
@@ -409,10 +411,12 @@ WC_MISC_STATIC WC_INLINE int ConstantCompare(const byte* a, const byte* b,
#if defined(HAVE_FIPS) && !defined(max) /* so ifdef check passes */
#define max max
#endif
+ #if defined(HAVE_FIPS) || !defined(max)
WC_MISC_STATIC WC_INLINE word32 max(word32 a, word32 b)
{
return a > b ? a : b;
}
+ #endif
#endif /* !WOLFSSL_HAVE_MAX */
#ifndef WOLFSSL_NO_INT_ENCODE
diff --git a/wolfssl/test.h b/wolfssl/test.h
index fff6363..8bdbafc 100644
--- a/wolfssl/test.h
+++ b/wolfssl/test.h
@@ -235,10 +235,12 @@
#ifdef NO_INLINE
#define min no_inline_min
#endif
+ #if defined(NO_INLINE) || !defined(min)
static WC_INLINE word32 min(word32 a, word32 b)
{
return a > b ? b : a;
}
+ #endif
#endif /* WOLFSSL_HAVE_MIN */
/* Socket Handling */