#ifndef STRICT_RFC
if (Conf_AuthPing) {
- Conn_SetAuthPing(Client_Conn(Client), random());
+ Conn_SetAuthPing(Client_Conn(Client), rand());
IRC_WriteStrClient(Client, "PING :%ld",
Conn_GetAuthPing(Client_Conn(Client)));
LogDebug("Connection %d: sent AUTH PING %ld ...",
if (read(fd, &seed, sizeof(seed)) == sizeof(seed))
ret = true;
close(fd);
- srandom(seed);
+ srand(seed);
}
return ret;
}
/**
- * Initialize libc random(3) number generator
+ * Initialize libc rand(3) number generator
*/
static void
Random_Init(void)
return;
if (Random_Init_Kern("/dev/arandom"))
return;
- srandom(random() ^ getpid() ^ time(NULL));
+ srand(rand() ^ getpid() ^ time(NULL));
}
return -1;
}
- seed = (unsigned int)random();
+ seed = (unsigned int)rand();
pid = fork();
switch (pid) {
case -1:
return -1;
case 0:
/* New child process: */
- srandom(seed ^ (unsigned int)time(NULL) ^ getpid());
+ srand(seed ^ (unsigned int)time(NULL) ^ getpid());
Signals_Exit();
signal(SIGTERM, Proc_GenericSignalHandler);
signal(SIGALRM, Proc_GenericSignalHandler);