[PATCH] trace: fix compile issue by using undefined symbol

Jintao Lin jintaolin at chromium.org
Thu Jan 4 14:05:39 PST 2024


This change fix commit 5545d995b3 which could use undefined symbol
testing_fail_alloc() in os_malloc().

Signed-off-by: Jintao Lin <jintaolin at chromium.org>
---
 src/utils/os_unix.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/utils/os_unix.c b/src/utils/os_unix.c
index d103ae832..b38549bbf 100644
--- a/src/utils/os_unix.c
+++ b/src/utils/os_unix.c
@@ -709,6 +709,12 @@ int testing_get_fail_pattern(bool is_alloc, char *buf, size_t buflen)
 #endif /* WPA_TRACE_BFD */
 }
 
+#else /* defined(WPA_TRACE_BFD) && defined(CONFIG_TESTING_OPTIONS) */
+
+static inline int testing_test_fail(const char *tag, bool is_alloc)
+{
+	return 0;
+}
 #endif
 
 void * os_malloc(size_t size)
-- 
2.43.0.472.g3155946c3a-goog




More information about the Hostap mailing list