diff --git a/plugins/commands.c b/plugins/commands.c
index 97ad06e..cb165b4 100644
--- a/plugins/commands.c
+++ b/plugins/commands.c
@@ -23,6 +23,7 @@
  * Author: Danny Baumann <dannybaumann@web.de>
  */
 
+#include <stdlib.h>
 #include <compiz-core.h>
 
 static CompMetadata commandsMetadata;
diff --git a/plugins/cube.c b/plugins/cube.c
index 5a77091..eeb86fb 100644
--- a/plugins/cube.c
+++ b/plugins/cube.c
@@ -24,6 +24,7 @@
  *         Mirco Müller <macslow@bangang.de> (Skydome support)
  */
 
+#include <stdlib.h>
 #include <string.h>
 #include <math.h>
 
diff --git a/plugins/matecompat.c b/plugins/matecompat.c
index 6c63162..9b2fe69 100644
--- a/plugins/matecompat.c
+++ b/plugins/matecompat.c
@@ -23,6 +23,7 @@
  * Author: Danny Baumann <dannybaumann@web.de>
  */
 
+#include <stdlib.h>
 #include <compiz-core.h>
 
 static CompMetadata mateMetadata;
diff --git a/plugins/obs.c b/plugins/obs.c
index 0f5b9d0..009bf36 100644
--- a/plugins/obs.c
+++ b/plugins/obs.c
@@ -23,6 +23,7 @@
  * Author: Danny Baumann <dannybaumann@web.de>
  */
 
+#include <stdlib.h>
 #include <compiz-core.h>
 
 static CompMetadata obsMetadata;
diff --git a/src/core.c b/src/core.c
index 6b69a28..d10d672 100644
--- a/src/core.c
+++ b/src/core.c
@@ -23,6 +23,7 @@
  * Author: David Reveman <davidr@novell.com>
  */
 
+#include <stdlib.h>
 #include <string.h>
 
 #include <compiz-core.h>
diff --git a/src/metadata.c b/src/metadata.c
index 3c1fa9f..215cb5e 100644
--- a/src/metadata.c
+++ b/src/metadata.c
@@ -25,6 +25,7 @@
  *          David Reveman <davidr@novell.com>
  */
 
+#include <stdlib.h>
 #include <string.h>
 #include <libxml/tree.h>
 #include <libxml/xpath.h>
