diff --git a/src/swanctl/swanctl.h b/src/swanctl/swanctl.h
index f0c334f..70f70d1 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.
