Group :: Monitoring
RPM: acct
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: acct-6.3.5-alt-ctime.patch
Download
Download
diff -uprk.orig acct-6.3.5.orig/al_share.cpp acct-6.3.5/al_share.cpp
--- acct-6.3.5.orig/al_share.cpp 1997-10-14 04:28:36 +0400
+++ acct-6.3.5/al_share.cpp 2005-04-07 19:11:45 +0400
@@ -117,8 +117,8 @@ parse_entries ()
utmp_print_file_and_line (stddebug);
fprintf (stddebug, ": problem: time warp (%-24.24s",
ctime (&last_time));
- fprintf (stddebug, " -> %-24.24s)\n",
- ctime ((time_t *) &(rec->ut_time)));
+ time_t tmp_time = rec->ut_time;
+ fprintf (stddebug, " -> %-24.24s)\n", ctime (&tmp_time));
}
#ifdef BACKWARDS
diff -uprk.orig acct-6.3.5.orig/pacct_rd.c acct-6.3.5/pacct_rd.c
--- acct-6.3.5.orig/pacct_rd.c 1997-10-14 04:28:36 +0400
+++ acct-6.3.5/pacct_rd.c 2005-04-07 19:14:23 +0400
@@ -117,7 +117,8 @@ print_pacct_record (struct acct *rec, FI
);
#endif
- fprintf (stddebug, "%s", ctime ((time_t *) &(rec->ac_btime)));
+ time_t tmp_time = rec->ac_btime;
+ fprintf (stddebug, "%s", ctime (&tmp_time));
}
diff -uprk.orig acct-6.3.5.orig/utmp_rd.c acct-6.3.5/utmp_rd.c
--- acct-6.3.5.orig/utmp_rd.c 1997-10-14 04:28:36 +0400
+++ acct-6.3.5/utmp_rd.c 2005-04-07 19:13:50 +0400
@@ -118,7 +118,8 @@ print_utmp_record (struct utmp *rec, FIL
fprintf (out, "%-*.*s|", HOST_LEN, HOST_LEN, rec->ut_host);
#endif
- fputs (ctime ((time_t *) &(rec->ut_time)), out);
+ time_t tmp_time = rec->ut_time;
+ fputs (ctime (&tmp_time), out);
}
}