diff --git a/unittest/keybundle/keybundle.cpp b/unittest/keybundle/keybundle.cpp
index f624a36d487998e5cab608644d7b5c07fb77032d..83b378242637433af1b5c81453f669a5497600ac 100644
--- a/unittest/keybundle/keybundle.cpp
+++ b/unittest/keybundle/keybundle.cpp
@@ -30,6 +30,8 @@
 #include "import_plugins.h"
 #endif
 
+#include <memory>
+
 class KeyBundleTest : public QObject
 {
     Q_OBJECT
 
diff --git a/unittest/pipeunittest/pipeunittest.cpp b/unittest/pipeunittest/pipeunittest.cpp
index 278931a9f9c8dffe6e21a4d71fcd09813bf4b0d2..5925c72cf2ee7d5cea6ad9a83715c4929b5962b1 100644
--- a/unittest/pipeunittest/pipeunittest.cpp
+++ b/unittest/pipeunittest/pipeunittest.cpp
@@ -30,6 +30,8 @@
 #include "import_plugins.h"
 #endif
 
+#include <memory>
+
 class PipeUnitTest : public QObject
 {
     Q_OBJECT
diff --git a/unittest/tls/tlsunittest.cpp b/unittest/tls/tlsunittest.cpp
index e7bbd06c982e5e5d7ef31b15020dbf038f9c20a9..8734fd2d20f0739a69c97d79d76ae9b910309e94 100644
--- a/unittest/tls/tlsunittest.cpp
+++ b/unittest/tls/tlsunittest.cpp
@@ -30,6 +30,8 @@
 #include "import_plugins.h"
 #endif
 
+#include <memory>
+
 class TLSUnitTest : public QObject
 {
     Q_OBJECT
diff --git a/plugins/qca-ossl/qca-ossl.cpp b/plugins/qca-ossl/qca-ossl.cpp
index 9c81746844f9d8543f7e9eff8603662f495d7a1e..aa8c1dd78eac220278834f0ff340f26eb2f647ba 100644
--- a/plugins/qca-ossl/qca-ossl.cpp
+++ b/plugins/qca-ossl/qca-ossl.cpp
@@ -32,6 +32,7 @@
 #include <cstdio>
 #include <cstdlib>
 #include <iostream>
+#include <memory>
 
 #include <openssl/err.h>
 #include <openssl/opensslv.h>
diff --git a/src/qca_default.cpp b/src/qca_default.cpp
index 294b90565e50c493da36eb6a5ba998fe2cb48645..7c017d7d0a3d49ee85dd58bd2eaefc387ba5d784 100644
--- a/src/qca_default.cpp
+++ b/src/qca_default.cpp
@@ -30,6 +30,8 @@
 #include "qca_systemstore.h"
 #endif
 
+#include <cstdlib>
+
 #define FRIENDLY_NAMES
 
 namespace QCA {
