X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=support%2Fnfs%2Frpcmisc.c;h=8c94ad93218cf4831a35d9a3d86e29d8b82f46a0;hb=93608a52655abf5ac23404c4b5cc05fe575a9c04;hp=1c02364cecb153e6f33886b3b40499d97268d4ea;hpb=e36b61ba46d34841a6ad99857c7cc43fc8c1ee89;p=nfs-utils.git diff --git a/support/nfs/rpcmisc.c b/support/nfs/rpcmisc.c index 1c02364..8c94ad9 100644 --- a/support/nfs/rpcmisc.c +++ b/support/nfs/rpcmisc.c @@ -12,7 +12,9 @@ * as is, with no warranty expressed or implied. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -226,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,