]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cronie: Resolve build failure with GCC15
authorKhem Raj <raj.khem@gmail.com>
Wed, 19 Mar 2025 08:15:54 +0000 (01:15 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 19 Mar 2025 12:09:04 +0000 (12:09 +0000)
Fix function prototypes for C23 to work

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/cronie/cronie/make_error_func_prototype_complete.patch [new file with mode: 0644]
meta/recipes-extended/cronie/cronie_1.7.2.bb

diff --git a/meta/recipes-extended/cronie/cronie/make_error_func_prototype_complete.patch b/meta/recipes-extended/cronie/cronie/make_error_func_prototype_complete.patch
new file mode 100644 (file)
index 0000000..71f0153
--- /dev/null
@@ -0,0 +1,41 @@
+From 09c630c654b2aeff06a90a412cce0a60ab4955a4 Mon Sep 17 00:00:00 2001
+From: Tomas Mraz <tmraz@fedoraproject.org>
+Date: Mon, 18 Nov 2024 21:02:30 +0100
+Subject: [PATCH] load_entry(): Make error_func prototype complete
+
+Fixes #193
+
+Upstream-Status: Backport [https://github.com/cronie-crond/cronie/commit/09c630c654b2aeff06a90a412cce0a60ab4955a4]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/entry.c | 2 +-
+ src/funcs.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/entry.c b/src/entry.c
+index 586eb9d..a2077e8 100644
+--- a/src/entry.c
++++ b/src/entry.c
+@@ -90,7 +90,7 @@ void free_entry(entry * e) {
+ /* return NULL if eof or syntax error occurs;
+  * otherwise return a pointer to a new entry.
+  */
+-entry *load_entry(FILE * file, void (*error_func) (), struct passwd *pw,
++entry *load_entry(FILE * file, void (*error_func) (const char *), struct passwd *pw,
+       char **envp) {
+       /* this function reads one crontab entry -- the next -- from a file.
+        * it skips any leading blank lines, ignores comments, and returns
+diff --git a/src/funcs.h b/src/funcs.h
+index 427e027..f28d634 100644
+--- a/src/funcs.h
++++ b/src/funcs.h
+@@ -89,7 +89,7 @@ char         *env_get(const char *, char **),
+ user          *load_user(int, struct passwd *, const char *, const char *, const char *),
+               *find_user(cron_db *, const char *, const char *);
+-entry         *load_entry(FILE *, void (*)(), struct passwd *, char **);
++entry         *load_entry(FILE *, void (*)(const char *), struct passwd *, char **);
+ FILE          *cron_popen(char *, const char *, struct passwd *, char **);
index 496ca39fd71edcc7519aaa2e50686e1cc5f66c63..b250717ab812fe302a16563f50bd4635809ea8d6 100644 (file)
@@ -17,6 +17,7 @@ SECTION = "utils"
 GITHUB_BASE_URI = "https://github.com/cronie-crond/${BPN}/releases/"
 
 SRC_URI = "${GITHUB_BASE_URI}/download/cronie-${PV}/cronie-${PV}.tar.gz \
+           file://make_error_func_prototype_complete.patch \
            file://crond.init \
            file://crontab \
            file://crond.service \