diff options
Diffstat (limited to 'sys-utils/ipcmk.c')
-rw-r--r-- | sys-utils/ipcmk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys-utils/ipcmk.c b/sys-utils/ipcmk.c index b4bc5be19..c91908bde 100644 --- a/sys-utils/ipcmk.c +++ b/sys-utils/ipcmk.c @@ -28,7 +28,7 @@ #include <sys/msg.h> #include <sys/sem.h> #include <sys/shm.h> -#include <time.h> +#include <sys/time.h> #include "c.h" #include "nls.h" @@ -36,7 +36,9 @@ key_t create_key(void) { - srandom(time(NULL)); + struct timeval now; + gettimeofday(&now, NULL); + srandom(now.tv_usec); return random(); } |