diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c
index 92c708be0e7c41a48727f4e0242cc4c3c803436f..b0277dfe9b9efcf711eee0da582c2e6e11213ab0 100644
--- a/libraries/libldap/tls_o.c
+++ b/libraries/libldap/tls_o.c
@@ -43,6 +43,9 @@
 #include <openssl/err.h>
 #include <openssl/rand.h>
 #include <openssl/safestack.h>
+#include <openssl/bn.h>
+#include <openssl/rsa.h>
+#include <openssl/dh.h>
 #elif defined( HAVE_SSL_H )
 #include <ssl.h>
 #endif