Index: xminesweep.h
--- xminesweep.h.orig
+++ xminesweep.h
@@ -25,6 +25,7 @@
 #include <X11/Xatom.h>
 
 #include <stdio.h>
+#include <stdlib.h>
 
 #ifndef SYSTEM_V
 #include <strings.h>
