Index: uspace/app/tetris/tetris.c
===================================================================
--- uspace/app/tetris/tetris.c	(revision ba2901865c3ab8afb4340d521a9d32f8d12af447)
+++ uspace/app/tetris/tetris.c	(revision c718bdada0e16b36b6f0f68df54a3ee343f91e49)
@@ -156,7 +156,7 @@
 const struct shape *randshape(void)
 {
-	const struct shape *tmp = &shapes[random() % 7];
+	const struct shape *tmp = &shapes[rand() % 7];
 	int i;
-	int j = random() % 4;
+	int j = rand() % 4;
 	
 	for (i = 0; i < j; i++)
@@ -171,5 +171,5 @@
 	
 	gettimeofday(&tv, NULL);
-	srandom(tv.tv_sec + tv.tv_usec / 100000);
+	srand(tv.tv_sec + tv.tv_usec / 100000);
 }
 
Index: uspace/dist/src/c/demos/tetris/tetris.c
===================================================================
--- uspace/dist/src/c/demos/tetris/tetris.c	(revision ba2901865c3ab8afb4340d521a9d32f8d12af447)
+++ uspace/dist/src/c/demos/tetris/tetris.c	(revision c718bdada0e16b36b6f0f68df54a3ee343f91e49)
@@ -157,7 +157,7 @@
 const struct shape *randshape(void)
 {
-	const struct shape *tmp = &shapes[random() % 7];
+	const struct shape *tmp = &shapes[rand() % 7];
 	int i;
-	int j = random() % 4;
+	int j = rand() % 4;
 	
 	for (i = 0; i < j; i++)
@@ -172,5 +172,5 @@
 	
 	gettimeofday(&tv, NULL);
-	srandom(tv.tv_sec + tv.tv_usec / 100000);
+	srand(tv.tv_sec + tv.tv_usec / 100000);
 }
 
Index: uspace/lib/c/generic/stdlib.c
===================================================================
--- uspace/lib/c/generic/stdlib.c	(revision ba2901865c3ab8afb4340d521a9d32f8d12af447)
+++ uspace/lib/c/generic/stdlib.c	(revision c718bdada0e16b36b6f0f68df54a3ee343f91e49)
@@ -35,12 +35,12 @@
 #include <stdlib.h>
 
-static long glbl_seed = 1;
+static int glbl_seed = 1;
 
-long int random(void)
+int rand(void)
 {
 	return glbl_seed = ((1366 * glbl_seed + 150889) % RAND_MAX);
 }
 
-void srandom(unsigned int seed)
+void srand(unsigned int seed)
 {
 	glbl_seed = seed % RAND_MAX;
Index: uspace/lib/c/generic/uuid.c
===================================================================
--- uspace/lib/c/generic/uuid.c	(revision ba2901865c3ab8afb4340d521a9d32f8d12af447)
+++ uspace/lib/c/generic/uuid.c	(revision c718bdada0e16b36b6f0f68df54a3ee343f91e49)
@@ -52,8 +52,8 @@
 	/* XXX This is a rather poor way of generating random numbers */
 	gettimeofday(&tv, NULL);
-	srandom(tv.tv_sec ^ tv.tv_usec);
+	srand(tv.tv_sec ^ tv.tv_usec);
 
 	for (i = 0; i < uuid_bytes; i++)
-		uuid->b[i] = random();
+		uuid->b[i] = rand();
 
 	/* Version 4 UUID from random or pseudo-random numbers */
Index: uspace/lib/c/include/stdlib.h
===================================================================
--- uspace/lib/c/include/stdlib.h	(revision ba2901865c3ab8afb4340d521a9d32f8d12af447)
+++ uspace/lib/c/include/stdlib.h	(revision c718bdada0e16b36b6f0f68df54a3ee343f91e49)
@@ -42,9 +42,6 @@
 #define RAND_MAX  714025
 
-#define rand()       random()
-#define srand(seed)  srandom(seed)
-
-extern long int random(void);
-extern void srandom(unsigned int seed);
+extern int rand(void);
+extern void srand(unsigned int seed);
 
 extern void abort(void) __attribute__((noreturn));
Index: uspace/lib/posix/source/stdlib.c
===================================================================
--- uspace/lib/posix/source/stdlib.c	(revision ba2901865c3ab8afb4340d521a9d32f8d12af447)
+++ uspace/lib/posix/source/stdlib.c	(revision c718bdada0e16b36b6f0f68df54a3ee343f91e49)
@@ -377,5 +377,5 @@
 int posix_rand(void)
 {
-	return (int) random();
+	return (int) rand();
 }
 
@@ -387,5 +387,5 @@
 void posix_srand(unsigned int seed)
 {
-	srandom(seed);
+	srand(seed);
 }
 
Index: uspace/srv/net/tcp/ncsim.c
===================================================================
--- uspace/srv/net/tcp/ncsim.c	(revision ba2901865c3ab8afb4340d521a9d32f8d12af447)
+++ uspace/srv/net/tcp/ncsim.c	(revision c718bdada0e16b36b6f0f68df54a3ee343f91e49)
@@ -81,5 +81,5 @@
 	return;
 
-	if (0 /*random() % 4 == 3*/) {
+	if (0 /*rand() % 4 == 3*/) {
 		/* Drop segment */
 		log_msg(LOG_DEFAULT, LVL_ERROR, "NCSim dropping segment");
@@ -94,5 +94,5 @@
 	}
 
-	sqe->delay = random() % (1000 * 1000);
+	sqe->delay = rand() % (1000 * 1000);
 	sqe->epp = *epp;
 	sqe->seg = seg;
