4e9ae2d45a
the link error are: arm-none-eabi-ld: /home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/staging/libapps.a(1-4.c.home.guoshichao.work_profile.vela_os.vela_ltp_1.apps.testing.ltp_3.o): in function `tst_process_state_wait3': /home/guoshichao/work_profile/vela_os/vela_ltp_1/apps/testing/ltp/ltp/testcases/open_posix_testsuite/include/proc.h:63: multiple definition of `tst_process_state_wait3'; /home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/staging/libapps.a(1-3.c.home.guoshichao.work_profile.vela_os.vela_ltp_1.apps.testing.ltp_3.o):/home/guoshichao/work_profile/vela_os/vela_ltp_1/apps/testing/ltp/ltp/testcases/open_posix_testsuite/include/proc.h:63: first defined here Signed-off-by: guoshichao <guoshichao@xiaomi.com>
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 6d38a0543d57f80954f9b2c2ec1f4a4c33b30894 Mon Sep 17 00:00:00 2001
|
|
From: guoshichao <guoshichao@xiaomi.com>
|
|
Date: Mon, 8 Jul 2024 16:38:22 +0800
|
|
Subject: [PATCH] ltp: fix the "tst_process_state_wait3" multi define error
|
|
|
|
VELAPLATFO-34850
|
|
|
|
fix the link error by making the "tst_process_state_wait3" to "static
|
|
inline" function
|
|
|
|
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
|
|
|
|
diff --git a/testcases/open_posix_testsuite/include/proc.h b/testcases/open_posix_testsuite/include/proc.h
|
|
index befb837..5d1d676 100644
|
|
--- a/testcases/open_posix_testsuite/include/proc.h
|
|
+++ b/testcases/open_posix_testsuite/include/proc.h
|
|
@@ -19,7 +19,7 @@
|
|
# include <errno.h>
|
|
# include <string.h>
|
|
|
|
-int tst_process_state_wait3(pid_t pid, const char state,
|
|
+static inline int tst_process_state_wait3(pid_t pid, const char state,
|
|
long maxwait_s)
|
|
{
|
|
char proc_path[128], cur_state;
|
|
@@ -58,7 +58,7 @@ int tst_process_state_wait3(pid_t pid, const char state,
|
|
return 1;
|
|
}
|
|
#else
|
|
-int tst_process_state_wait3(pid_t pid PTS_ATTRIBUTE_UNUSED,
|
|
+static inline int tst_process_state_wait3(pid_t pid PTS_ATTRIBUTE_UNUSED,
|
|
const char state PTS_ATTRIBUTE_UNUSED, long maxwait_s)
|
|
{
|
|
struct timespec maxwait_ts;
|
|
--
|
|
2.45.1
|
|
|