mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
handle password file locking.
This commit is contained in:
@@ -1491,13 +1491,13 @@ __p_secstodate (secs)
|
||||
{
|
||||
static char output[15]; /* YYYYMMDDHHMMSS and null */
|
||||
time_t clock = secs;
|
||||
struct tm *time;
|
||||
struct tm time;
|
||||
|
||||
time = gmtime(&clock);
|
||||
time->tm_year += 1900;
|
||||
time->tm_mon += 1;
|
||||
__gmtime_r(&clock, &time);
|
||||
time.tm_year += 1900;
|
||||
time.tm_mon += 1;
|
||||
sprintf(output, "%04d%02d%02d%02d%02d%02d",
|
||||
time->tm_year, time->tm_mon, time->tm_mday,
|
||||
time->tm_hour, time->tm_min, time->tm_sec);
|
||||
time.tm_year, time.tm_mon, time.tm_mday,
|
||||
time.tm_hour, time.tm_min, time.tm_sec);
|
||||
return (output);
|
||||
}
|
||||
|
Reference in New Issue
Block a user