fix compile error: list_initialize

Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
This commit is contained in:
zhangchao53 2024-03-15 16:19:17 +08:00 committed by Xiang Xiao
parent 38d30f9984
commit 5519de826f
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From 69f394f331d7b5f3e9d6f54ab789baba4608519f Mon Sep 17 00:00:00 2001
From: zhangchao53 <zhangchao53@xiaomi.com>
Date: Fri, 15 Mar 2024 15:44:08 +0800
Subject: [PATCH] fix linux risc-v compile error:list_initialize
VELAPLATFO-28608
Change-Id: I3155358a9fac328d13697b87b426467a570ad305
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
---
src/cmocka.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/cmocka.c b/src/cmocka.c
index 8214d6e..4df687c 100644
--- a/src/cmocka.c
+++ cmocka/src/cmocka.c
@@ -99,6 +99,10 @@
#define MAX(a,b) ((a) < (b) ? (b) : (a))
#endif
+#ifdef list_initialize
+#undef list_initialize
+#endif
+
/**
* POSIX has sigsetjmp/siglongjmp, while Windows only has setjmp/longjmp.
*/
--
2.25.1

View File

@ -46,6 +46,7 @@ cmocka.zip:
$(Q) patch -p0 < 0003-cmocka-update-method-for-strmatch-to-regex-and-add-list-all-testcases-function.patch
$(Q) patch -p0 < 0004-cmocka-xml-report.patch
$(Q) patch -p0 < 0005-cmocka-cmocka_private-fix-warning-in-cmocka_private.patch
$(Q) patch -p0 < 0006-fix-linux-risc-v-compile-error-list_initialize.patch
context:: cmocka.zip