1From 9c9623c8a47fb5580dfea1a59296c6d224479504 Mon Sep 17 00:00:00 2001 2From: Sergei Trofimovich <slyfox@gentoo.org> 3Date: Mon, 2 Mar 2020 23:45:22 +0000 4Subject: [PATCH] mod_quotatab: fix build failure against gcc-10 5 6On gcc-10 (and gcc-9 -fno-common) build fails as: 7 8``` 9$ ./configure --with-modules=mod_quotatab && make 10... 11ld: modules/module_glue.o:(.data.rel+0x68): 12 undefined reference to `quotatab_file_module' 13collect2: error: ld returned 1 exit status 14make: *** [Makefile:56: proftpd] Error 1 15``` 16 17gcc-10 will change the default from -fcommon to fno-common: 18https://gcc.gnu.org/PR85678. 19 20The error also happens if CFLAGS=-fno-common passed explicitly. 21 22Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 23 24[Retrieved from: 25https://github.com/proftpd/proftpd/commit/9c9623c8a47fb5580dfea1a59296c6d224479504] 26Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 27--- 28 contrib/mod_quotatab.c | 1 + 29 contrib/mod_quotatab.h | 2 +- 30 2 files changed, 2 insertions(+), 1 deletion(-) 31 32diff --git a/contrib/mod_quotatab.c b/contrib/mod_quotatab.c 33index 4fa6c1f44..0ee480163 100644 34--- a/contrib/mod_quotatab.c 35+++ b/contrib/mod_quotatab.c 36@@ -50,6 +50,7 @@ typedef struct regtab_obj { 37 module quotatab_module; 38 39 /* Quota objects for the current session */ 40+quota_deltas_t quotatab_deltas; 41 static quota_table_t *limit_tab = NULL; 42 static quota_limit_t sess_limit; 43 44diff --git a/contrib/mod_quotatab.h b/contrib/mod_quotatab.h 45index ed30333f5..c818395a0 100644 46--- a/contrib/mod_quotatab.h 47+++ b/contrib/mod_quotatab.h 48@@ -188,7 +188,7 @@ typedef struct table_obj { 49 #define QUOTATAB_TALLY_SRC 0x0002 50 51 /* Quota objects for the current session. */ 52-quota_deltas_t quotatab_deltas; 53+extern quota_deltas_t quotatab_deltas; 54 55 /* Function prototypes necessary for quotatab sub-modules */ 56 int quotatab_log(const char *, ...) 57