diff --git a/Tests/X11/HelloWorldX11.cxx b/Tests/X11/HelloWorldX11.cxx
index 5bbc19a..6cfecf9 100644
--- a/Tests/X11/HelloWorldX11.cxx
+++ b/Tests/X11/HelloWorldX11.cxx
@@ -21,6 +21,8 @@
 #include <X11/Xutil.h>
 #include <X11/Xos.h>
 
+#include <stdlib.h> // rand()
+
 class Main {
 
 public:
