ref: 9d9d7716dbc95db5e4381289debeb2c22ff0a1e9
parent: 72d686424d6fccfdf180946efa3bdd9eb0746997
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Sep 14 13:04:30 EDT 2021
libc: Improve bsd/_sigaction.c _setcontext() and _sigaction2() are declared with the correct type.
--- 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);
}