ltp: fix the build warning
the warning are: ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c:163: warning: "NSIG" redefined 163 | #define NSIG (sizeof(signals)/sizeof(int)) | In file included from /home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/include/pthread.h:35, from ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c:31: /home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/include/signal.h:53: note: this is the location of the previous definition 53 | #define NSIG _NSIG /* _NSIG variant commonly used */ Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
parent
4e9ae2d45a
commit
8cb59a75ea
32
testing/ltp/0012-ltp-fix-build-error.patch
Normal file
32
testing/ltp/0012-ltp-fix-build-error.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 9606a31fbff78592352bcccf667ab0eb7a26ef5a Mon Sep 17 00:00:00 2001
|
||||
From: fangxinyong <fangxinyong@xiaomi.com>
|
||||
Date: Tue, 29 Aug 2023 19:03:51 +0800
|
||||
Subject: [PATCH] ltp: fix build error
|
||||
|
||||
VELAPLATFO-8233
|
||||
|
||||
ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c:171: error: "NSIG" redefined [-Werror]
|
||||
171 | #define NSIG (sizeof(signals)/sizeof(int))
|
||||
In file included from /home/work/ssd1/workspace/MiRTOS-CI/nuttx/include/pthread.h:35,
|
||||
from ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c:31:
|
||||
/home/work/ssd1/workspace/MiRTOS-CI/nuttx/include/signal.h:53: note: this is the location of the previous definition
|
||||
53 | #define NSIG _NSIG /* _NSIG variant commonly used */
|
||||
|
||||
Change-Id: I5a7d695612dd8f17ad735a369a9b904ee71f70ee
|
||||
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
|
||||
|
||||
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
|
||||
index 0617210bf..dda0c3a09 100644
|
||||
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
|
||||
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
|
||||
@@ -168,6 +168,7 @@ static void *test(void *arg LTP_ATTRIBUTE_UNUSED)
|
||||
sigset_t set;
|
||||
int i, j = 0;
|
||||
int signals[] = { SIGBUS, SIGKILL, SIGABRT, SIGCHLD, SIGHUP };
|
||||
+#undef NSIG
|
||||
#define NSIG (sizeof(signals)/sizeof(int))
|
||||
int operation[] = { SIG_SETMASK, SIG_BLOCK, SIG_UNBLOCK };
|
||||
|
||||
--
|
||||
2.45.1
|
||||
|
@ -257,6 +257,7 @@ $(LTP_UNPACK): ltp-$(LTPS_VERSION).zip
|
||||
$(Q) patch -d $(LTP_UNPACK) -p1 < 0009-ltp-modify-user-code-for-fdcheck-compatibility.patch
|
||||
$(Q) patch -d $(LTP_UNPACK) -p1 < 0010-ltp-fix-build-warning.patch
|
||||
$(Q) patch -d $(LTP_UNPACK) -p1 < 0011-ltp-fix-the-proc.h-header-file-duplicate-inclusion.patch
|
||||
$(Q) patch -d $(LTP_UNPACK) -p1 < 0012-ltp-fix-build-error.patch
|
||||
|
||||
# Download and unpack tarball if no git repo found
|
||||
ifeq ($(wildcard $(LTP_UNPACK)/.git),)
|
||||
|
Loading…
Reference in New Issue
Block a user