summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch')
-rw-r--r--meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch77
1 files changed, 39 insertions, 38 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch b/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
index 945280c627..4ac14dc857 100644
--- a/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
+++ b/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
@@ -1,11 +1,12 @@
-From aff0e2a8f011fa80b472355355a7e8cdacd50189 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 19:53:30 +0000
-Subject: [PATCH 11/32] Rename sigset variable to sigset1
+From dc1905b6d972f9176b40da270c83d8fb4d1751b5 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Wed, 8 Feb 2017 16:12:34 +0800
+Subject: [PATCH 2/5] Rename sigset variable to sigset1
sigset API from signal.h is shadowed by this name conflict
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
testcases/kernel/mem/shmt/shmt04.c | 10 +++++-----
testcases/kernel/mem/shmt/shmt06.c | 10 +++++-----
@@ -13,15 +14,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
-index 7203e9e..fce87d6 100644
+index b2682da..3f35fad 100644
--- a/testcases/kernel/mem/shmt/shmt04.c
+++ b/testcases/kernel/mem/shmt/shmt04.c
@@ -56,7 +56,7 @@ int TST_TOTAL = 2; /* Total number of test cases. */
/**************/
key_t key;
--sigset_t sigset;
-+sigset_t sigset1;
+-sigset_t set;
++sigset_t set1;
#define SIZE 16*1024
@@ -29,12 +30,12 @@ index 7203e9e..fce87d6 100644
key = (key_t) getpid();
-- sigemptyset(&sigset);
-- sigaddset(&sigset, SIGUSR1);
-- sigprocmask(SIG_BLOCK, &sigset, NULL);
-+ sigemptyset(&sigset1);
-+ sigaddset(&sigset1, SIGUSR1);
-+ sigprocmask(SIG_BLOCK, &sigset1, NULL);
+- sigemptyset(&set);
+- sigaddset(&set, SIGUSR1);
+- sigprocmask(SIG_BLOCK, &set, NULL);
++ sigemptyset(&set1);
++ sigaddset(&set1, SIGUSR1);
++ sigprocmask(SIG_BLOCK, &set1, NULL);
pid = fork();
switch (pid) {
@@ -42,21 +43,21 @@ index 7203e9e..fce87d6 100644
char *cp;
int sig;
-- sigwait(&sigset, &sig);
-+ sigwait(&sigset1, &sig);
+- sigwait(&set, &sig);
++ sigwait(&set1, &sig);
chld_pid = getpid();
/*--------------------------------------------------------*/
diff --git a/testcases/kernel/mem/shmt/shmt06.c b/testcases/kernel/mem/shmt/shmt06.c
-index a3c9ca3..77b0fc9 100644
+index dd69de7..56fb1da 100644
--- a/testcases/kernel/mem/shmt/shmt06.c
+++ b/testcases/kernel/mem/shmt/shmt06.c
@@ -57,7 +57,7 @@ int TST_TOTAL = 2; /* Total number of test cases. */
/**************/
key_t key;
--sigset_t sigset;
-+sigset_t sigset1;
+-sigset_t set;
++sigset_t set1;
int child();
static int rm_shm(int);
@@ -64,12 +65,12 @@ index a3c9ca3..77b0fc9 100644
key = (key_t) getpid();
-- sigemptyset(&sigset);
-- sigaddset(&sigset, SIGUSR1);
-- sigprocmask(SIG_BLOCK, &sigset, NULL);
-+ sigemptyset(&sigset1);
-+ sigaddset(&sigset1, SIGUSR1);
-+ sigprocmask(SIG_BLOCK, &sigset1, NULL);
+- sigemptyset(&set);
+- sigaddset(&set, SIGUSR1);
+- sigprocmask(SIG_BLOCK, &set, NULL);
++ sigemptyset(&set1);
++ sigaddset(&set1, SIGUSR1);
++ sigprocmask(SIG_BLOCK, &set1, NULL);
pid = fork();
switch (pid) {
@@ -77,21 +78,21 @@ index a3c9ca3..77b0fc9 100644
char *cp;
int sig;
-- sigwait(&sigset, &sig);
-+ sigwait(&sigset1, &sig);
+- sigwait(&set, &sig);
++ sigwait(&set1, &sig);
chld_pid = getpid();
if ((shmid = shmget(key, SIZE, 0)) < 0) {
diff --git a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-index 20fca52..6fb1d57 100644
+index 232d25a..06d902f 100644
--- a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
+++ b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
@@ -91,7 +91,7 @@ int TST_TOTAL = 1;
int sig_catch = 0; /* variable to blocked/unblocked signals */
struct sigaction sa_new; /* struct to hold signal info */
--sigset_t sigset; /* signal set to hold signal lists */
-+sigset_t sigset1; /* signal set to hold signal lists */
+-sigset_t set; /* signal set to hold signal lists */
++sigset_t set1; /* signal set to hold signal lists */
sigset_t sigset2;
int main(int ac, char **av)
@@ -99,8 +100,8 @@ index 20fca52..6fb1d57 100644
* so that, signal will not be delivered to
* the test process.
*/
-- TEST(sigprocmask(SIG_BLOCK, &sigset, 0));
-+ TEST(sigprocmask(SIG_BLOCK, &sigset1, 0));
+- TEST(sigprocmask(SIG_BLOCK, &set, 0));
++ TEST(sigprocmask(SIG_BLOCK, &set1, 0));
/* Get the process id of test process */
my_pid = getpid();
@@ -108,8 +109,8 @@ index 20fca52..6fb1d57 100644
*/
errno = 0;
if (sigprocmask(SIG_UNBLOCK,
-- &sigset, 0) == -1) {
-+ &sigset1, 0) == -1) {
+- &set, 0) == -1) {
++ &set1, 0) == -1) {
tst_brkm(TFAIL, cleanup,
"sigprocmask() failed "
"to unblock signal, "
@@ -117,8 +118,8 @@ index 20fca52..6fb1d57 100644
* Initialise the signal sets with the list that
* excludes/includes all system-defined signals.
*/
-- if (sigemptyset(&sigset) == -1) {
-+ if (sigemptyset(&sigset1) == -1) {
+- if (sigemptyset(&set) == -1) {
++ if (sigemptyset(&set1) == -1) {
tst_brkm(TFAIL, cleanup,
"sigemptyset() failed, errno=%d : %s",
errno, strerror(errno));
@@ -126,11 +127,11 @@ index 20fca52..6fb1d57 100644
* Add specified signal (SIGINT) to the signal set
* which excludes system-defined signals.
*/
-- if (sigaddset(&sigset, SIGINT) == -1) {
-+ if (sigaddset(&sigset1, SIGINT) == -1) {
+- if (sigaddset(&set, SIGINT) == -1) {
++ if (sigaddset(&set1, SIGINT) == -1) {
tst_brkm(TFAIL, cleanup,
"sigaddset() failed, errno=%d : %s",
errno, strerror(errno));
--
-2.7.0
+2.7.4