diff options
Diffstat (limited to 'src/lib/libcrypto/mem_dbg.c')
| -rw-r--r-- | src/lib/libcrypto/mem_dbg.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/libcrypto/mem_dbg.c b/src/lib/libcrypto/mem_dbg.c index e212de27e4..8316485217 100644 --- a/src/lib/libcrypto/mem_dbg.c +++ b/src/lib/libcrypto/mem_dbg.c | |||
| @@ -59,11 +59,11 @@ | |||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
| 61 | #include <time.h> | 61 | #include <time.h> |
| 62 | #include "cryptlib.h" | ||
| 62 | #include <openssl/crypto.h> | 63 | #include <openssl/crypto.h> |
| 63 | #include <openssl/buffer.h> | 64 | #include <openssl/buffer.h> |
| 64 | #include <openssl/bio.h> | 65 | #include <openssl/bio.h> |
| 65 | #include <openssl/lhash.h> | 66 | #include <openssl/lhash.h> |
| 66 | #include "cryptlib.h" | ||
| 67 | 67 | ||
| 68 | static int mh_mode=CRYPTO_MEM_CHECK_OFF; | 68 | static int mh_mode=CRYPTO_MEM_CHECK_OFF; |
| 69 | /* The state changes to CRYPTO_MEM_CHECK_ON | CRYPTO_MEM_CHECK_ENABLE | 69 | /* The state changes to CRYPTO_MEM_CHECK_ON | CRYPTO_MEM_CHECK_ENABLE |
| @@ -252,8 +252,16 @@ long CRYPTO_dbg_get_options(void) | |||
| 252 | /* static int mem_cmp(MEM *a, MEM *b) */ | 252 | /* static int mem_cmp(MEM *a, MEM *b) */ |
| 253 | static int mem_cmp(const void *a_void, const void *b_void) | 253 | static int mem_cmp(const void *a_void, const void *b_void) |
| 254 | { | 254 | { |
| 255 | #ifdef _WIN64 | ||
| 256 | const char *a=(const char *)((const MEM *)a_void)->addr, | ||
| 257 | *b=(const char *)((const MEM *)b_void)->addr; | ||
| 258 | if (a==b) return 0; | ||
| 259 | else if (a>b) return 1; | ||
| 260 | else return -1; | ||
| 261 | #else | ||
| 255 | return((const char *)((const MEM *)a_void)->addr | 262 | return((const char *)((const MEM *)a_void)->addr |
| 256 | - (const char *)((const MEM *)b_void)->addr); | 263 | - (const char *)((const MEM *)b_void)->addr); |
| 264 | #endif | ||
| 257 | } | 265 | } |
| 258 | 266 | ||
| 259 | /* static unsigned long mem_hash(MEM *a) */ | 267 | /* static unsigned long mem_hash(MEM *a) */ |
