about summary refs log tree commit diff
path: root/sunrpc/create_xid.c
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc/create_xid.c')
-rw-r--r--sunrpc/create_xid.c6
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;
     }