summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
-rw-r--r--sunrpc/create_xid.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sunrpc/create_xid.c b/sunrpc/create_xid.c
index 2f132a1..f4d9172 100644
--- a/sunrpc/create_xid.c
+++ b/sunrpc/create_xid.c
@@ -22,7 +22,7 @@
#ifndef SYLIXOS
#include <libc-lock.h>
#endif
-#include <kernrpc/rpc.h>
+#include <rpc/rpc.h>
/* The RPC code is not threadsafe, but new code should be threadsafe. */
@@ -33,11 +33,6 @@ static pid_t is_initialized;
static struct drand48_data __rpc_lrand48_data;
#endif
-static int getktid (void)
-{
- return ((int)API_ThreadIdSelf() & 0xffff);
-}
-
unsigned long
_create_xid (void)
{
@@ -45,7 +40,7 @@ _create_xid (void)
__libc_lock_lock (createxid_lock);
- pid_t pid = (pid_t)getktid ();
+ pid_t pid = getpid ();
if (is_initialized != pid)
{
struct timeval now;
@@ -53,7 +48,7 @@ _create_xid (void)
__gettimeofday (&now, (struct timezone *) 0);
#ifndef SYLIXOS
__srand48_r (now.tv_sec ^ now.tv_usec ^ pid,
- &__rpc_lrand48_data);
+ &__rpc_lrand48_data);
#else
srand48(now.tv_sec ^ now.tv_usec ^ pid);
#endif