diff --git a/ChangeLog b/ChangeLog
index 8e5337b7d00cbd78bcbb10c2bb3306b5b476e092..9981003a5eb45670a5813d696860bd5499fccbf6 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
 
 2005-11-07  Kevin P. Fleming  <kpfleming@digium.com>
 
+	* cryptostub.c: include necessary headers
+	* include/asterisk/crypto.h: don't include unnecessary headers
+
 	* manager.c (action_setvar): add support for setting global variables (issue #5571)
 
 	* Makefile: correct cross-compilation issue introduced in Cygwin patches (issue #5572)
diff --git a/cryptostub.c b/cryptostub.c
index 99fbe3e45142caf3e7d95c2b5b14832feaa4cebc..4d2809e0de7ef8454dce18c43e58c7b56d1e8ef2 100755
--- a/cryptostub.c
+++ b/cryptostub.c
@@ -16,7 +16,11 @@
  * at the top of the source tree.
  */
 
+#include <unistd.h>
+#include <stdlib.h>
+
 #include "asterisk/crypto.h"
+#include "asterisk/logger.h"
 
 /* Hrm, I wonder if the compiler is smart enough to only create two functions
    for all these...  I could force it to only make two, but those would be some
diff --git a/include/asterisk/crypto.h b/include/asterisk/crypto.h
index 2463ba4ed8d39af266a998f0df69da45e48d03ad..d0f852caf07304b97b1361fe3c4c2385659018a0 100755
--- a/include/asterisk/crypto.h
+++ b/include/asterisk/crypto.h
@@ -23,9 +23,6 @@
 #ifndef _ASTERISK_CRYPTO_H
 #define _ASTERISK_CRYPTO_H
 
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
 #endif