diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp
index 78bbd2cd..07b9f89c 100644
--- a/src/dht_proxy_server.cpp
+++ b/src/dht_proxy_server.cpp
@@ -18,6 +18,10 @@
* along with this program. If not, see .
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "dht_proxy_server.h"
#include "default_types.h"
diff --git a/src/dhtrunner.cpp b/src/dhtrunner.cpp
index f68e76ec..15633679 100644
--- a/src/dhtrunner.cpp
+++ b/src/dhtrunner.cpp
@@ -18,6 +18,10 @@
* along with this program. If not, see .
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "dhtrunner.h"
#include "securedht.h"
#include "network_utils.h"
diff --git a/src/securedht.cpp b/src/securedht.cpp
index d117d561..18dd951e 100644
--- a/src/securedht.cpp
+++ b/src/securedht.cpp
@@ -17,6 +17,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "securedht.h"
#include "rng.h"
diff --git a/src/value.cpp b/src/value.cpp
index 5a77f70c..0750a530 100644
--- a/src/value.cpp
+++ b/src/value.cpp
@@ -17,6 +17,10 @@
* along with this program. If not, see .
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "value.h"
#include "default_types.h"
diff --git a/tools/dhtnode.cpp b/tools/dhtnode.cpp
index 7b200b9b..85eb7be7 100644
--- a/tools/dhtnode.cpp
+++ b/tools/dhtnode.cpp
@@ -18,6 +18,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "tools_common.h"
extern "C" {