mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-25 11:22:30 +01:00
Fix `-Wincompatible-pointer-types` error.
```
nslinkd.c:357:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
357 | signal(SIGHUP, sighup_handler);
| ^~~~~~~~~~~~~~
| |
| void (*)(void)
In file included from nslinkd.c:30:
/usr/include/signal.h:289:20: note: expected 'void (*)(int)' but argument is of type 'void (*)(void)'
289 | void (*signal(int, void (*)(int)))(int);
| ^~~~~~~~~~~~~
nslinkd.c:355:13: note: 'sighup_handler' declared here
355 | static void sighup_handler()
| ^~~~~~~~~~~~~~
```
21 lines
312 B
Diff
21 lines
312 B
Diff
--- a/nslinkd.c
|
|
+++ b/nslinkd.c
|
|
@@ -329,7 +329,7 @@
|
|
}
|
|
|
|
|
|
-static void sigterm_handler()
|
|
+static void sigterm_handler(int)
|
|
{
|
|
int i;
|
|
|
|
@@ -352,7 +352,7 @@
|
|
exit(0);
|
|
}
|
|
|
|
-static void sighup_handler()
|
|
+static void sighup_handler(int)
|
|
{
|
|
signal(SIGHUP, sighup_handler);
|
|
return;
|