Fix multiple definition of `event_node_list' (#1794446)

This commit is contained in:
Steve Grubb 2020-01-29 14:19:59 -05:00
parent 44cc91866e
commit 3f2ddd38fb

View File

@ -1,22 +1,23 @@
From 3c9672de4743e34c33c2ebb6d9b46aefcec5fb44 Mon Sep 17 00:00:00 2001 From 017e6c6ab95df55f34e339d2139def83e5dada1f Mon Sep 17 00:00:00 2001
From: Steve Grubb <sgrubb@redhat.com> From: Steve Grubb <sgrubb@redhat.com>
Date: Thu, 23 Jan 2020 17:27:20 -0500 Date: Fri, 10 Jan 2020 21:13:50 -0500
Subject: [PATCH] fix compiler warning Subject: [PATCH] Header definitions need to be external when building with
-fno-common (which is default in GCC 10) - Tony Jones
--- ---
audisp/plugins/syslog/audisp-syslog.c | 2 +- src/ausearch-common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/audisp/plugins/syslog/audisp-syslog.c b/audisp/plugins/syslog/audisp-syslog.c diff --git a/src/ausearch-common.h b/src/ausearch-common.h
index 9daa021..d4fc565 100644 index 6669203..3040547 100644
--- a/audisp/plugins/syslog/audisp-syslog.c --- a/src/ausearch-common.h
+++ b/audisp/plugins/syslog/audisp-syslog.c +++ b/src/ausearch-common.h
@@ -207,7 +207,7 @@ static inline void write_syslog(char *s) @@ -50,7 +50,7 @@ extern pid_t event_pid;
} extern int event_exact_match;
} extern uid_t event_uid, event_euid, event_loginuid;
extern const char *event_tuid, *event_teuid, *event_tauid;
-int main(int argc, char *argv[]) -slist *event_node_list;
+int main(int argc, const char *argv[]) +extern slist *event_node_list;
{ extern const char *event_comm;
char tmp[MAX_AUDIT_MESSAGE_LENGTH+1]; extern const char *event_filename;
struct sigaction sa; extern const char *event_hostname;