From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH 2/7] watchdog: Include needed system header for function decls
Date: Tue, 23 Aug 2022 23:34:38 -0700 [thread overview]
Message-ID: <20220824063443.1774094-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20220824063443.1774094-1-raj.khem@gmail.com>
These headers are needed on musl too.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...guard-sys-quota.h-sys-swap.h-and-sys.patch | 37 +++++++++++++++++++
.../watchdog/watchdog_5.16.bb | 1 +
2 files changed, 38 insertions(+)
create mode 100644 meta/recipes-extended/watchdog/watchdog/0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch
diff --git a/meta/recipes-extended/watchdog/watchdog/0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch b/meta/recipes-extended/watchdog/watchdog/0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch
new file mode 100644
index 0000000000..8c419e1d11
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch
@@ -0,0 +1,37 @@
+From ca1d379fa13c4055d42d2ff3a647b4397768efcd 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
+
+Upstream-Status: Submitted [https://sourceforge.net/p/watchdog/patches/12/]
+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
+
diff --git a/meta/recipes-extended/watchdog/watchdog_5.16.bb b/meta/recipes-extended/watchdog/watchdog_5.16.bb
index 1163846ed8..26fcc10487 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.16.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.16.bb
@@ -13,6 +13,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
file://watchdog.init \
file://wd_keepalive.init \
file://0001-wd_keepalive.service-use-run-instead-of-var-run.patch \
+ file://0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch \
"
SRC_URI[md5sum] = "1b4f51cabc64d1bee2fce7cdd626831f"
--
2.37.2
next prev parent reply other threads:[~2022-08-24 6:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 6:34 [PATCH 1/7] xinetd: Pass missing -D_GNU_SOURCE Khem Raj
2022-08-24 6:34 ` Khem Raj [this message]
2022-08-24 6:34 ` [PATCH 3/7] libcgroup: Use GNU strerror_r only when its available Khem Raj
2022-08-24 6:34 ` [PATCH 4/7] enable _XOPEN_SOURCE on musl for wchar usage in curses Khem Raj
2022-08-24 9:44 ` [OE-core] " Luca Ceresoli
2022-08-24 13:56 ` Khem Raj
2022-08-24 6:34 ` [PATCH 5/7] apr: Use correct strerror_r implementation based on libc type Khem Raj
2022-08-24 6:34 ` [PATCH 6/7] gcr: Define _GNU_SOURCE Khem Raj
2022-08-24 6:34 ` [PATCH 7/7] ltp: Adjust types to match create_fifo_thread return Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220824063443.1774094-2-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.