mirror of git://anongit.mindrot.org/openssh.git
Add implementation of localtime_r.
This commit is contained in:
parent
2046ed16c1
commit
1bcd1169c5
|
@ -1763,6 +1763,7 @@ AC_CHECK_FUNCS([ \
|
|||
inet_ntop \
|
||||
innetgr \
|
||||
llabs \
|
||||
localtime_r \
|
||||
login_getcapbool \
|
||||
md5_crypt \
|
||||
memmem \
|
||||
|
|
|
@ -426,3 +426,13 @@ int _ssh_compat_fflush(FILE *f)
|
|||
return fflush(f);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LOCALTIME_R
|
||||
struct tm *
|
||||
localtime_r(const time_t *timep, struct tm *result)
|
||||
{
|
||||
struct tm *tm = localtime(timep);
|
||||
*result = *tm;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -178,4 +178,8 @@ int flock(int, int);
|
|||
# define fflush(x) (_ssh_compat_fflush(x))
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LOCALTIME_R
|
||||
struct tm *localtime_r(const time_t *, struct tm *);
|
||||
#endif
|
||||
|
||||
#endif /* _BSD_MISC_H */
|
||||
|
|
Loading…
Reference in New Issue