summaryrefslogtreecommitdiffstats
path: root/support/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'support/nfs')
-rw-r--r--support/nfs/conn.c1
-rw-r--r--support/nfs/rpcmisc.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/support/nfs/conn.c b/support/nfs/conn.c
index a020394..bf2afad 100644
--- a/support/nfs/conn.c
+++ b/support/nfs/conn.c
@@ -7,6 +7,7 @@
*/
#include <errno.h>
+#include <unistd.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h>
diff --git a/support/nfs/rpcmisc.c b/support/nfs/rpcmisc.c
index c7bff40..8c94ad9 100644
--- a/support/nfs/rpcmisc.c
+++ b/support/nfs/rpcmisc.c
@@ -228,10 +228,12 @@ rpc_logcall(struct svc_req *rqstp, char *xname, char *arg)
break;
case AUTH_UNIX: {
struct authunix_parms *unix_cred;
+ time_t time;
struct tm *tm;
unix_cred = (struct authunix_parms *) rqstp->rq_clntcred;
- tm = localtime(&unix_cred->aup_time);
+ time = unix_cred->aup_time;
+ tm = localtime(&time);
snprintf(sp, buflen, "UNIX %d/%d/%d %02d:%02d:%02d %s %d.%d",
tm->tm_year, tm->tm_mon + 1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec,