[LTP] [PATCH V3 22/23] pec: Replace obsoleted SA_ONESHOT with SA_RESETHAND

Khem Raj raj.khem@gmail.com
Fri Jul 22 06:26:55 CEST 2016


This is needed especially for musl, for glibc _GNU_SOURCE
is added by libc-features.h automatically. which defines SA_ONESHOT

Fixes

pec_listener.c: In function ‘main’:
pec_listener.c:233:27: error: ‘SA_ONESHOT’ undeclared (first use in this function)
  sigint_action.sa_flags = SA_ONESHOT;
                           ^~~~~~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/connectors/pec/pec_listener.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/connectors/pec/pec_listener.c b/testcases/kernel/connectors/pec/pec_listener.c
index a1beb13..d11e4dc 100644
--- a/testcases/kernel/connectors/pec/pec_listener.c
+++ b/testcases/kernel/connectors/pec/pec_listener.c
@@ -230,7 +230,7 @@ int main(int argc, char **argv)
 	struct sockaddr_nl src_addr;
 	struct pollfd pfd;
 
-	sigint_action.sa_flags = SA_ONESHOT;
+	sigint_action.sa_flags = SA_RESETHAND;
 	sigint_action.sa_handler = &sigint_handler;
 	sigaction(SIGINT, &sigint_action, NULL);
 
-- 
2.9.0



More information about the ltp mailing list