diff options
author | 2014-04-17 13:29:09 +0000 | |
---|---|---|
committer | 2014-04-17 13:29:09 +0000 | |
commit | 13a198f36d1d9331db2b4026046e2cf3ddc231da (patch) | |
tree | 2de6e7d0260ead0cc44865925a07563ecc877cec /lib/libssl/src | |
parent | OPENSSL_DECLARE_EXIT serves no purpose. (diff) | |
download | wireguard-openbsd-13a198f36d1d9331db2b4026046e2cf3ddc231da.tar.xz wireguard-openbsd-13a198f36d1d9331db2b4026046e2cf3ddc231da.zip |
OPENSSL_gmtime() is not a gmtime() wrapper. It is a gmtime_r().
Always trying to confuse people...
ok guenther
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/o_time.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/libssl/src/crypto/o_time.c b/lib/libssl/src/crypto/o_time.c index 44f7ba3b8c5..83028356b91 100644 --- a/lib/libssl/src/crypto/o_time.c +++ b/lib/libssl/src/crypto/o_time.c @@ -63,24 +63,10 @@ #include <string.h> #include "o_time.h" -struct tm -*OPENSSL_gmtime(const time_t *timer, struct tm *result) { - struct tm *ts = NULL; - -#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_OS2) && (!defined(OPENSSL_SYS_VMS) || defined(gmtime_r)) && !defined(OPENSSL_SYS_MACOSX) && !defined(OPENSSL_SYS_SUNOS) - /* should return &data, but doesn't on some systems, - so we don't even look at the return value */ - gmtime_r(timer, result); - ts = result; -#else - ts = gmtime(timer); - if (ts == NULL) - return NULL; - - memcpy(result, ts, sizeof(struct tm)); - ts = result; -#endif - return ts; +struct tm * +OPENSSL_gmtime(const time_t *timer, struct tm *result) +{ + return gmtime_r(timer, result); } /* Take a tm structure and add an offset to it. This avoids any OS issues |