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: 501bd53a6c ("swanctl: Make credential directories relative to swanctl.conf")
Closes strongswan/strongswan#163.
This commit is contained in:
@@ -30,7 +30,7 @@
|
|||||||
/**
|
/**
|
||||||
* Base directory for credentials and config
|
* Base directory for credentials and config
|
||||||
*/
|
*/
|
||||||
char *swanctl_dir;
|
extern char *swanctl_dir;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration file for connections, etc.
|
* Configuration file for connections, etc.
|
||||||
|
|||||||
Reference in New Issue
Block a user