swanctl: Add missing `extern` for `swanctl_dir` variable in header
authorTobias Brunner <tobias@strongswan.org>
Tue, 28 Jan 2020 09:33:55 +0000 (10:33 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 28 Jan 2020 14:29:40 +0000 (15:29 +0100)
commit91c6387e69c09beaa9b9ca1e28471751a834fc24
treea71f3ce69f83cf3f800349e6430f9c869ed799de
parent8ea13bbc5ccdb7a67e5b2c0e0465d432dd24614b
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.
src/swanctl/swanctl.h