summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2020-11-26 11:32:42 +0100
committerDavid Seifert <soap@gentoo.org>2020-11-26 11:32:42 +0100
commitfd6ae80cf2f1191ee1504798257fe8efe26e7e9c (patch)
tree40d8ee8362d2a0ed68dac45479005a689c2c8221
parentmedia-gfx/arss: port to EAPI 7 (diff)
downloadgentoo-fd6ae80cf2f1191ee1504798257fe8efe26e7e9c.tar.gz
gentoo-fd6ae80cf2f1191ee1504798257fe8efe26e7e9c.tar.bz2
gentoo-fd6ae80cf2f1191ee1504798257fe8efe26e7e9c.zip
sys-apps/restartd: fix build with gcc-10
Closes: https://bugs.gentoo.org/707678 Package-Manager: Portage-3.0.9, Repoman-3.0.1 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--sys-apps/restartd/files/restartd-0.2.2-fno-common.patch66
-rw-r--r--sys-apps/restartd/restartd-0.2.2-r1.ebuild5
2 files changed, 69 insertions, 2 deletions
diff --git a/sys-apps/restartd/files/restartd-0.2.2-fno-common.patch b/sys-apps/restartd/files/restartd-0.2.2-fno-common.patch
new file mode 100644
index 000000000000..c0b0ad5ff8b1
--- /dev/null
+++ b/sys-apps/restartd/files/restartd-0.2.2-fno-common.patch
@@ -0,0 +1,66 @@
+--- a/config.c
++++ b/config.c
+@@ -22,6 +22,14 @@
+ #include <syslog.h>
+ #include "config.h"
+
++int debug;
++int config_process_number;
++int check_interval;
++int foreground;
++char *config_file;
++struct config_process_type *config_process;
++struct config_process_type config_process_type;
++
+ int
+ read_config (void)
+ {
+--- a/config.h
++++ b/config.h
+@@ -34,12 +34,12 @@
+ #define DEFAULT_CONFIG "/etc/restartd.conf"
+ #define VERSION "0.2.1"
+
+-int debug; // Debug
+-int config_process_number;
+-int check_interval;
+-int foreground;
+-struct config_process_type *config_process;
+-char *config_file;
++extern int debug; // Debug
++extern int config_process_number;
++extern int check_interval;
++extern int foreground;
++extern struct config_process_type *config_process;
++extern char *config_file;
+
+ typedef struct config_process_type
+ {
+@@ -51,7 +51,9 @@ typedef struct config_process_type
+ char processes[256];
+ char status[32];
+
+-} config_process_type;
++};
++
++extern struct config_process_type config_process_type;
+
+ int read_config ( /* char *config_file */ );
+
+--- a/main.c
++++ b/main.c
+@@ -35,6 +35,14 @@
+
+ #include "config.h"
+
++extern int debug;
++extern int config_process_number;
++extern int check_interval;
++extern int foreground;
++extern char *config_file;
++extern struct config_process_type *config_process;
++extern struct config_process_type config_process_type;
++
+ // SIGTERM & SIGHUP handler
+ void
+ got_signal (int sig)
diff --git a/sys-apps/restartd/restartd-0.2.2-r1.ebuild b/sys-apps/restartd/restartd-0.2.2-r1.ebuild
index dadb97c5f33b..6f78d10eb3a3 100644
--- a/sys-apps/restartd/restartd-0.2.2-r1.ebuild
+++ b/sys-apps/restartd/restartd-0.2.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,8 @@ SRC_URI="mirror://debian/pool/main/r/restartd/${PN}_${MY_PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
+
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
src_prepare() {
default