From: Tobias Brunner Date: Tue, 28 Jan 2020 09:33:55 +0000 (+0100) Subject: swanctl: Add missing `extern` for `swanctl_dir` variable in header X-Git-Tag: 5.8.3dr1~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91c6387e69c09beaa9b9ca1e28471751a834fc24;p=thirdparty%2Fstrongswan.git swanctl: Add missing `extern` for `swanctl_dir` variable in header This clearly never was correct, but didn't cause problems so far. However, GCC 10 will default to `-fno-common` instead of `-fcommon` (https://gcc.gnu.org/PR85678), so compilation there fails with something like: ``` libtool: link: gcc ... -o .libs/swanctl ... ld: commands/load_authorities.o:strongswan/src/swanctl/./swanctl.h:33: multiple definition of `swanctl_dir'; commands/load_all.o:strongswan/src/swanctl/./swanctl.h:33: first defined here ``` Fixes: 501bd53a6cce ("swanctl: Make credential directories relative to swanctl.conf") Closes strongswan/strongswan#163. --- diff --git a/src/swanctl/swanctl.h b/src/swanctl/swanctl.h index f0c334f7ef..70f70d179b 100644 --- a/src/swanctl/swanctl.h +++ b/src/swanctl/swanctl.h @@ -30,7 +30,7 @@ /** * Base directory for credentials and config */ -char *swanctl_dir; +extern char *swanctl_dir; /** * Configuration file for connections, etc.