diff -Naur keepassx-0.4.3-orig/src/lib/random.cpp keepassx-0.4.3/src/lib/random.cpp
--- keepassx-0.4.3-orig/src/lib/random.cpp	2009-06-28 17:22:31.000000000 +0300
+++ keepassx-0.4.3/src/lib/random.cpp	2012-09-24 10:27:03.553117870 +0300
@@ -23,6 +23,7 @@
 
 #if defined(Q_WS_X11) || defined(Q_WS_MAC)
 	#include <QFile>
+	#include <unistd.h>
 #elif defined(Q_WS_WIN)
 	#include <windows.h>
 	#include <wincrypt.h>
