fix musl compatibility
[project/librpc-uclibc.git] / create_xid.c
index 1ba5f55..35d26d1 100644 (file)
@@ -31,7 +31,6 @@
 __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_MUTEX_INITIALIZER);
 
 static smallint is_initialized;
-static struct drand48_data __rpc_lrand48_data;
 
 u_long _create_xid (void) attribute_hidden;
 u_long _create_xid (void)
@@ -45,11 +44,11 @@ u_long _create_xid (void)
       struct timeval now;
 
       gettimeofday (&now, (struct timezone *) 0);
-      srand48_r (now.tv_sec ^ now.tv_usec, &__rpc_lrand48_data);
+      srand48 (now.tv_sec ^ now.tv_usec);
       is_initialized = 1;
     }
 
-  lrand48_r (&__rpc_lrand48_data, &res);
+  res = lrand48();
 
   __UCLIBC_MUTEX_UNLOCK(mylock);