From 5519de826f15259b49864643bfb9107630d1ce98 Mon Sep 17 00:00:00 2001 From: zhangchao53 Date: Fri, 15 Mar 2024 16:19:17 +0800 Subject: [PATCH] fix compile error: list_initialize Signed-off-by: zhangchao53 --- ...risc-v-compile-error-list_initialize.patch | 31 +++++++++++++++++++ testing/cmocka/Makefile | 1 + 2 files changed, 32 insertions(+) create mode 100644 testing/cmocka/0006-fix-linux-risc-v-compile-error-list_initialize.patch diff --git a/testing/cmocka/0006-fix-linux-risc-v-compile-error-list_initialize.patch b/testing/cmocka/0006-fix-linux-risc-v-compile-error-list_initialize.patch new file mode 100644 index 000000000..154b09ca1 --- /dev/null +++ b/testing/cmocka/0006-fix-linux-risc-v-compile-error-list_initialize.patch @@ -0,0 +1,31 @@ +From 69f394f331d7b5f3e9d6f54ab789baba4608519f Mon Sep 17 00:00:00 2001 +From: zhangchao53 +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 +--- + 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 + diff --git a/testing/cmocka/Makefile b/testing/cmocka/Makefile index 0193db42e..c2694f6c5 100644 --- a/testing/cmocka/Makefile +++ b/testing/cmocka/Makefile @@ -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