diff --git a/compute/zgram.c b/compute/zgram.c
index 124c5f4b784b31f4ca79394d9349fcb27ce5abc1..371accf2ea3417a921f4bc4f3a3a2938acf118e1 100644
--- a/compute/zgram.c
+++ b/compute/zgram.c
@@ -17,6 +17,7 @@
  *
  */
 #include "control/common.h"
+#include <stdlib.h>
 
 /**
  ********************************************************************************