diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/o_time.c | 22 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/o_time.c | 22 |
2 files changed, 8 insertions, 36 deletions
diff --git a/src/lib/libcrypto/o_time.c b/src/lib/libcrypto/o_time.c index 44f7ba3b8c..83028356b9 100644 --- a/src/lib/libcrypto/o_time.c +++ b/src/lib/libcrypto/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 |
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 |
