diff options
Diffstat (limited to 'sunrpc/create_xid.c')
-rw-r--r-- | sunrpc/create_xid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sunrpc/create_xid.c b/sunrpc/create_xid.c index 1339615a1b..c692c1eb92 100644 --- a/sunrpc/create_xid.c +++ b/sunrpc/create_xid.c @@ -39,10 +39,10 @@ _create_xid (void) pid_t pid = getpid (); if (is_initialized != pid) { - struct timeval now; + struct timespec now; - __gettimeofday (&now, (struct timezone *) 0); - __srand48_r (now.tv_sec ^ now.tv_usec ^ pid, + __clock_gettime (CLOCK_REALTIME, &now); + __srand48_r (now.tv_sec ^ now.tv_nsec ^ pid, &__rpc_lrand48_data); is_initialized = pid; } |