1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| | From 84edc2042bb0a82e65bd4d165b706519886b4075 Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date: Mon, 10 Aug 2020 19:39:30 +0100
Subject: [PATCH] Fix build with gcc-10
Bug: https://bugs.debian.org/957761
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
config.h | 12 ++++++------
restartd.c | 7 +++++++
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/config.h b/config.h
index fabaa2b..a79b28e 100644
--- a/config.h
+++ b/config.h
@@ -25,12 +25,12 @@
#define DEFAULT_CONFIG "/etc/restartd.conf"
-int debug;
-int config_process_number;
-int check_interval;
-int foreground;
-struct config_process_type *config_process;
-char *config_file;
+extern int 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 {
char name[64];
diff --git a/restartd.c b/restartd.c
index 2aa720c..617b298 100644
--- a/restartd.c
+++ b/restartd.c
@@ -35,6 +35,13 @@
#include "config.h"
+int debug;
+int config_process_number;
+int check_interval;
+int foreground;
+struct config_process_type *config_process;
+char *config_file;
+
/* SIGTERM & SIGHUP handler */
void got_signal(int sig)
{
|