File 0001-satisfy-gcc-flag-fno-common.patch of Package rsyslog

From 4cacfc34e8f90d40313897a3ef66f0547895cbe6 Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Thu, 9 Jan 2020 09:37:54 +0100
Subject: [PATCH] satisfy-gcc-flag-fno-common

Porting advice for gcc 10:

A common mistake in C is omitting <code>extern</code> when declaring a global
variable in a header file.  If the header is included by several files it
results in multiple definitions of the same variable.  In previous GCC versions
this error is ignored.  GCC 10 defaults to <code>-fno-common</code>, which
means a linker error will now be reported. To fix this, use <code>extern</code>
in header files when declaring global variables, and ensure each global is
defined in exactly one C file. As a workaround, legacy C code can be compiled
with -fcommon.
---
 tools/omfile.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/omfile.h b/tools/omfile.h
index ee55de3d9..dc7298d28 100644
--- a/tools/omfile.h
+++ b/tools/omfile.h
@@ -32,7 +32,7 @@ rsRetVal modInitFile(int iIFVersRequested __attribute__((unused)), int *ipIFVers
  * other way to have the functionality (well, one way would be to go through the
  * globals, but that seems not yet justified. -- rgerhards, 2010-03-01
  */
-uchar	*pszFileDfltTplName;
+extern uchar	*pszFileDfltTplName;
 #endif /* #ifndef OMFILE_H_INCLUDED */
 /* vi:set ai:
  */
-- 
2.16.4