diff options
| author | deraadt <> | 2014-04-17 13:29:09 +0000 | 
|---|---|---|
| committer | deraadt <> | 2014-04-17 13:29:09 +0000 | 
| commit | 573fb747035238b149293e4fe1bda66011432b7a (patch) | |
| tree | 9b2941a5edf4e35d10f110f502150197ac6c6e82 /src/lib/libssl/src | |
| parent | 9c0daba711f974dff593393027752f678730cc10 (diff) | |
| download | openbsd-573fb747035238b149293e4fe1bda66011432b7a.tar.gz openbsd-573fb747035238b149293e4fe1bda66011432b7a.tar.bz2 openbsd-573fb747035238b149293e4fe1bda66011432b7a.zip | |
OPENSSL_gmtime() is not a gmtime() wrapper.  It is a gmtime_r().
Always trying to confuse people...
ok guenther
Diffstat (limited to 'src/lib/libssl/src')
| -rw-r--r-- | src/lib/libssl/src/crypto/o_time.c | 22 | 
1 files changed, 4 insertions, 18 deletions
| diff --git a/src/lib/libssl/src/crypto/o_time.c b/src/lib/libssl/src/crypto/o_time.c index 44f7ba3b8c..83028356b9 100644 --- a/src/lib/libssl/src/crypto/o_time.c +++ b/src/lib/libssl/src/crypto/o_time.c | |||
| @@ -63,24 +63,10 @@ | |||
| 63 | #include <string.h> | 63 | #include <string.h> | 
| 64 | #include "o_time.h" | 64 | #include "o_time.h" | 
| 65 | 65 | ||
| 66 | struct tm | 66 | struct tm * | 
| 67 | *OPENSSL_gmtime(const time_t *timer, struct tm *result) { | 67 | OPENSSL_gmtime(const time_t *timer, struct tm *result) | 
| 68 | struct tm *ts = NULL; | 68 | { | 
| 69 | 69 | return gmtime_r(timer, result); | |
| 70 | #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) | ||
| 71 | /* should return &data, but doesn't on some systems, | ||
| 72 | so we don't even look at the return value */ | ||
| 73 | gmtime_r(timer, result); | ||
| 74 | ts = result; | ||
| 75 | #else | ||
| 76 | ts = gmtime(timer); | ||
| 77 | if (ts == NULL) | ||
| 78 | return NULL; | ||
| 79 | |||
| 80 | memcpy(result, ts, sizeof(struct tm)); | ||
| 81 | ts = result; | ||
| 82 | #endif | ||
| 83 | return ts; | ||
| 84 | } | 70 | } | 
| 85 | 71 | ||
| 86 | /* Take a tm structure and add an offset to it. This avoids any OS issues | 72 | /* Take a tm structure and add an offset to it. This avoids any OS issues | 
