Index: uspace/lib/posix/include/posix/stdlib.h
===================================================================
--- uspace/lib/posix/include/posix/stdlib.h	(revision 3dd148d953c70e48d8af23bcc31daae517c34b27)
+++ uspace/lib/posix/include/posix/stdlib.h	(revision 81bd5f4c6ab163ef7c45d8b034dd6e0d0c5de284)
@@ -46,4 +46,6 @@
 	#define NULL  ((void *) 0)
 #endif
+
+#define RAND_MAX  714025
 
 /* Process Termination */
@@ -122,4 +124,8 @@
 extern int __POSIX_DEF__(mkstemp)(char *tmpl);
 
+/* Pseudo-random number generator */
+extern int __POSIX_DEF__(rand)(void);
+extern void __POSIX_DEF__(srand)(unsigned int seed);
+
 /* Legacy Declarations */
 extern char *__POSIX_DEF__(mktemp)(char *tmpl);
Index: uspace/lib/posix/source/stdlib.c
===================================================================
--- uspace/lib/posix/source/stdlib.c	(revision 3dd148d953c70e48d8af23bcc31daae517c34b27)
+++ uspace/lib/posix/source/stdlib.c	(revision 81bd5f4c6ab163ef7c45d8b034dd6e0d0c5de284)
@@ -394,4 +394,24 @@
 
 /**
+ * Generate a pseudo random integer in the range 0 to RAND_MAX inclusive.
+ *
+ * @return The pseudo random integer.
+ */
+int posix_rand(void)
+{
+	return (int) random();
+}
+
+/**
+ * Initialize a new sequence of pseudo-random integers.
+ *
+ * @param seed The seed of the new sequence.
+ */
+void posix_srand(unsigned int seed)
+{
+	srandom(seed);
+}
+
+/**
  * Creates and opens an unique temporary file from template.
  *
