diff mbox series

trace: fix compile issue by using undefined symbol

Message ID 20240104220540.2336966-1-jintaolin@chromium.org
State Accepted
Headers show
Series trace: fix compile issue by using undefined symbol | expand

Commit Message

Jintao Lin Jan. 4, 2024, 10:05 p.m. UTC
This change fix commit 5545d995b3 which could use undefined symbol
testing_fail_alloc() in os_malloc().

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

Comments

Jouni Malinen Jan. 13, 2024, 10:27 p.m. UTC | #1
On Thu, Jan 04, 2024 at 10:05:39PM +0000, Jintao Lin wrote:
> This change fix commit 5545d995b3 which could use undefined symbol
> testing_fail_alloc() in os_malloc().

Thanks, applied.
diff mbox series

Patch

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)