commit 2f6204fc7d4ae7434dc79322254f323c8e73a7cf
parent fbfd556e6d215320ed8b8105482616b5f4eafa86
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 14 Sep 2021 17:04:30 +0200
libc: Improve bsd/_sigaction.c
_setcontext() and _sigaction2() are declared with the correct
type.
Diffstat:
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/libc/arch/bsd/_sigaction.c b/src/libc/arch/bsd/_sigaction.c
@@ -1,14 +1,17 @@
 #include <stddef.h>
 #include <sys.h>
 
-extern int _sigaction2(int sig,
-                       struct sigaction *new, struct sigaction *old,
-                       int siginfo[], int num);
+typedef struct ucontext_t ucontext_t;
+
+extern int _sigaction2(int,
+                       struct sigaction *, struct sigaction *,
+                       const void *,
+                       int);
+
+extern int _setcontext(ucontext_t *);
 
 int
 _sigaction(int sig, struct sigaction *new, struct sigaction *old)
 {
-	extern int _setcontext[];
-
 	return _sigaction2(sig, new, old, _setcontext, 2);
 }