From 48244f1f8e544bf7018bfee96d590326b0d98b2b Mon Sep 17 00:00:00 2001 From: Zhou Kang Date: Wed, 14 Jun 2023 03:27:40 +0000 Subject: [PATCH] fix tests build error --- tests/test_app/common_func.c | 1 + tests/test_app/test_app.c | 5 ++++- tests/test_app/util1.c | 1 + tests/test_app/util2.c | 1 + tests/test_ifunc/test_ifunc.c | 1 + tests/test_simple/Makefile | 2 +- tests/test_simple/simple_app.c | 1 + 7 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_app/common_func.c b/tests/test_app/common_func.c index 1ed83e7..91ad7c8 100644 --- a/tests/test_app/common_func.c +++ b/tests/test_app/common_func.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: MulanPSL-2.0 */ #include #include #include diff --git a/tests/test_app/test_app.c b/tests/test_app/test_app.c index dbf3085..a1959d7 100644 --- a/tests/test_app/test_app.c +++ b/tests/test_app/test_app.c @@ -1,10 +1,13 @@ -#include +/* SPDX-License-Identifier: MulanPSL-2.0 */ +#define _GNU_SOURCE +#include #include #include #include #include #include #include +#include extern int lib1_add(int a, int b); extern int lib2_add(int a, int b); diff --git a/tests/test_app/util1.c b/tests/test_app/util1.c index 12d361f..6299b95 100644 --- a/tests/test_app/util1.c +++ b/tests/test_app/util1.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: MulanPSL-2.0 */ #include __attribute__((constructor)) void constructor_in_lib1(void) diff --git a/tests/test_app/util2.c b/tests/test_app/util2.c index f31148c..cdfcfe7 100644 --- a/tests/test_app/util2.c +++ b/tests/test_app/util2.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: MulanPSL-2.0 */ #include // __thread int g_thread_lib21 = 5; diff --git a/tests/test_ifunc/test_ifunc.c b/tests/test_ifunc/test_ifunc.c index 2b0aa0f..7082e26 100644 --- a/tests/test_ifunc/test_ifunc.c +++ b/tests/test_ifunc/test_ifunc.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: MulanPSL-2.0 */ #include #include #include diff --git a/tests/test_simple/Makefile b/tests/test_simple/Makefile index 90a317f..a2b2318 100644 --- a/tests/test_simple/Makefile +++ b/tests/test_simple/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MulanPSL-2.0 -ROOT_DIR=../../../ +ROOT_DIR=../../ BUILD_DIR=$(ROOT_DIR)build/ SYSBOOST=$(BUILD_DIR)sysboost/sysboost TEST_APP=$(BUILD_DIR)sysboost/tests/test_simple/simple_app diff --git a/tests/test_simple/simple_app.c b/tests/test_simple/simple_app.c index 5110d01..634c3fc 100644 --- a/tests/test_simple/simple_app.c +++ b/tests/test_simple/simple_app.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: MulanPSL-2.0 */ #include int main(void) -- Gitee