diff --git a/random.c b/random.c
index 1a75fbf8f1c3ad9743a0e703577163bc18f98d2c..0378e9a602d7970b04cfc53d72a03fd8234bcd7a 100644
--- a/random.c
+++ b/random.c
@@ -217,6 +217,9 @@ void seedrandom() {
 	pid = getpid();
 	sha1_process(&hs, (void*)&pid, sizeof(pid));
 
+	// gettimeofday() doesn't completely fill out struct timeval on 
+	// OS X (10.8.3), avoid valgrind warnings by clearing it first
+	memset(&tv, 0x0, sizeof(tv));
 	gettimeofday(&tv, NULL);
 	sha1_process(&hs, (void*)&tv, sizeof(tv));