[LTP] [PATCH 17/31] replace sigval_t with union sigval
Khem Raj
raj.khem@gmail.com
Fri Jan 8 09:11:37 CET 2016
This makes it compatible across musl and glibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c | 2 +-
testcases/kernel/syscalls/timer_gettime/timer_gettime01.c | 2 +-
testcases/kernel/timers/timer_create/timer_create02.c | 4 ++--
testcases/kernel/timers/timer_create/timer_create03.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
index d186c1f..bc03544 100644
--- a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
+++ b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
@@ -54,7 +54,7 @@ int main(int ac, char **av)
setup();
- ev.sigev_value = (sigval_t) 0;
+ ev.sigev_value = (union sigval) 0;
ev.sigev_signo = SIGALRM;
ev.sigev_notify = SIGEV_SIGNAL;
TEST(ltp_syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &timer));
diff --git a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
index b583aee..9371a6a 100644
--- a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
+++ b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
@@ -55,7 +55,7 @@ int main(int ac, char **av)
setup();
- ev.sigev_value = (sigval_t) 0;
+ ev.sigev_value = (union sigval) 0;
ev.sigev_signo = SIGALRM;
ev.sigev_notify = SIGEV_SIGNAL;
TEST(ltp_syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &timer));
diff --git a/testcases/kernel/timers/timer_create/timer_create02.c b/testcases/kernel/timers/timer_create/timer_create02.c
index 7f528ed..1127400 100644
--- a/testcases/kernel/timers/timer_create/timer_create02.c
+++ b/testcases/kernel/timers/timer_create/timer_create02.c
@@ -142,7 +142,7 @@ void setup_test(int option)
{
switch (option) {
case 0:
- evp.sigev_value = (sigval_t) 0;
+ evp.sigev_value = (union sigval) 0;
evp.sigev_signo = SIGALRM;
evp.sigev_notify = SIGEV_SIGNAL;
evp_ptr = &evp;
@@ -151,7 +151,7 @@ void setup_test(int option)
evp_ptr = NULL;
break;
case 2:
- evp.sigev_value = (sigval_t) 0;
+ evp.sigev_value = (union sigval) 0;
evp.sigev_signo = SIGALRM; /* any will do */
evp.sigev_notify = SIGEV_NONE;
evp_ptr = &evp;
diff --git a/testcases/kernel/timers/timer_create/timer_create03.c b/testcases/kernel/timers/timer_create/timer_create03.c
index 291fcfa..8b01bf7 100644
--- a/testcases/kernel/timers/timer_create/timer_create03.c
+++ b/testcases/kernel/timers/timer_create/timer_create03.c
@@ -129,7 +129,7 @@ void setup_test(int option)
{
switch (option) {
case 0:
- evp.sigev_value = (sigval_t) 0;
+ evp.sigev_value = (union sigval) 0;
evp.sigev_signo = SIGALRM;
evp.sigev_notify = SIGEV_SIGNAL;
evp_ptr = &evp;
@@ -138,7 +138,7 @@ void setup_test(int option)
evp_ptr = NULL;
break;
case 2:
- evp.sigev_value = (sigval_t) 0;
+ evp.sigev_value = (union sigval) 0;
evp.sigev_signo = SIGALRM; /* any will do */
evp.sigev_notify = SIGEV_NONE;
evp_ptr = &evp;
--
2.7.0
More information about the Ltp
mailing list