mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 19:29:53 +03:00
65 lines
1.9 KiB
Diff
65 lines
1.9 KiB
Diff
Source: https://sourceforge.net/p/watchdog/patches/12/attachment/0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch
|
|
|
|
Fix -Wimplicit-function-declaration error with gcc 14.
|
|
In addition to the patch source, fix a header redirect warning.
|
|
|
|
```
|
|
shutdown.c: In function 'mnt_off':
|
|
shutdown.c:185:45: error: implicit declaration of function 'quotactl' [-Wimplicit-function-declaration]
|
|
185 | if (quotactl(QCMD(Q_QUOTAOFF, GRPQUOTA), mnt->mnt_fsname, 0, (caddr_t) 0) < 0) {
|
|
| ^~~~~~~~
|
|
shutdown.c: In function 'do_shutdown':
|
|
shutdown.c:410:17: error: implicit declaration of function 'reboot' [-Wimplicit-function-declaration]
|
|
410 | reboot(RB_AUTOBOOT);
|
|
| ^~~~~~
|
|
```
|
|
|
|
--
|
|
From 4eb1c69e191e44c0f9680a9c1e95e6b0f90fb31a Mon Sep 17 00:00:00 2001
|
|
From: Khem Raj <raj.khem@gmail.com>
|
|
Date: Tue, 23 Aug 2022 19:23:26 -0700
|
|
Subject: [PATCH] shutdown: Do not guard sys/quota.h sys/swap.h and
|
|
sys/reboot.h with __GLIBC__
|
|
|
|
These headers are provided by uclibc/musl/glibc and bionic so we can
|
|
assume they are not needed to be glibc specific includes. This also
|
|
ensures that we get proper declaration of reboot() API
|
|
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
---
|
|
src/shutdown.c | 4 ----
|
|
1 file changed, 4 deletions(-)
|
|
|
|
diff --git a/src/shutdown.c b/src/shutdown.c
|
|
index 1d9a857..6aea0d0 100644
|
|
--- a/src/shutdown.c
|
|
+++ b/src/shutdown.c
|
|
@@ -29,13 +29,9 @@
|
|
#include "extern.h"
|
|
#include "ext2_mnt.h"
|
|
|
|
-#if defined __GLIBC__
|
|
#include <sys/quota.h>
|
|
#include <sys/swap.h>
|
|
#include <sys/reboot.h>
|
|
-#else /* __GLIBC__ */
|
|
-#include <linux/quota.h>
|
|
-#endif /* __GLIBC__ */
|
|
|
|
#include <unistd.h>
|
|
|
|
--
|
|
2.37.2
|
|
|
|
|
|
--- watchdog-5.16-origin/src/pidfile.c
|
|
+++ watchdog-5.16/src/pidfile.c
|
|
@@ -7,7 +7,7 @@
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
-#include <wait.h>
|
|
+#include <sys/wait.h>
|
|
|
|
#include "extern.h"
|
|
#include "watch_err.h"
|