diff --git a/fs/afs/main.c b/fs/afs/main.c
index 35de0c04729fdbe357b10ddab7f870f3b560d8cc..0b187ef3b5b7a2909b6e07c2dd4cd57d9569789b 100644
--- a/fs/afs/main.c
+++ b/fs/afs/main.c
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/completion.h>
 #include <linux/sched.h>
+#include <linux/random.h>
 #include "internal.h"
 
 MODULE_DESCRIPTION("AFS Client File System");