Files
mbedtls/mbedtls-3.6.4-threading-alt.patch

37 lines
929 B
Diff

--- a/include/mbedtls/mbedtls_config.h
+++ b/include/mbedtls/mbedtls_config.h
@@ -2156,7 +2156,7 @@
*
* Uncomment this to allow your own alternate threading implementation.
*/
-//#define MBEDTLS_THREADING_ALT
+#define MBEDTLS_THREADING_ALT
/**
* \def MBEDTLS_THREADING_PTHREAD
@@ -3749,7 +3749,7 @@
*
* Enable this layer to allow use of mutexes within Mbed TLS
*/
-//#define MBEDTLS_THREADING_C
+#define MBEDTLS_THREADING_C
/**
* \def MBEDTLS_TIMING_C
--- /dev/null
+++ b/include/mbedtls/threading_alt.h
@@ -0,0 +1,5 @@
+#ifndef MBEDTLS_THREADING_ALT_H
+#define MBEDTLS_THREADING_ALT_H
+typedef void *mbedtls_threading_mutex_t;
+typedef void *mbedtls_test_thread_t;
+#endif
--- /dev/null
+++ b/framework/tests/include/test/threading_alt.h
@@ -0,0 +1,5 @@
+#ifndef MBEDTLS_THREADING_ALT_H
+#define MBEDTLS_THREADING_ALT_H
+typedef void *mbedtls_threading_mutex_t;
+typedef void *mbedtls_test_thread_t;
+#endif