diff --git a/src/MemoryX.h b/src/MemoryX.h
index 56e99171a9eb87fe574291d0ec9d086efb0c1fbb..621afa3001ba354f36e80edb86c72a45dca426cb 100644
--- a/src/MemoryX.h
+++ b/src/MemoryX.h
@@ -3,6 +3,8 @@
 
 // C++ standard header <memory> with a few extensions
 #include <memory>
+#include <stdlib.h>
+ 
 #ifndef safenew
 #define safenew new
 #endif