X-Git-Url: http://the.earth.li/gitweb/?p=onak.git;a=blobdiff_plain;f=keydb%2Fkeydctl.c;h=7a659ab1aaf9fc6eba6a6de836b46e2c97cd1534;hp=8712f6361d00978817f42f717989e3f545ebb18d;hb=97be85bfba76b9ed0aa6ad01afc7c6efc4b370d5;hpb=743957a08f068529d3add3e8485678b4e5034195 diff --git a/keydb/keydctl.c b/keydb/keydctl.c index 8712f63..7a659ab 100644 --- a/keydb/keydctl.c +++ b/keydb/keydctl.c @@ -150,6 +150,7 @@ static void keyd_status(void) { uint32_t reply; struct keyd_stats stats; + char started[26]; /* ctime(3) says 26 is the necessary size */ if (keyd_do_command(KEYD_CMD_VERSION, &reply, sizeof(reply)) == -1) { printf("Got failure asking for keyd version.\n"); @@ -162,7 +163,7 @@ static void keyd_status(void) return; } - printf("keyd running since %s", ctime(&stats.started)); + printf("keyd running since %s", ctime_r(&stats.started, started)); printf("%d client connections received\n", stats.connects); printf("Command statistics:\n");