diff options
Diffstat (limited to 'usr/src/common/openssl/crypto/mem_dbg.c')
-rw-r--r-- | usr/src/common/openssl/crypto/mem_dbg.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/src/common/openssl/crypto/mem_dbg.c b/usr/src/common/openssl/crypto/mem_dbg.c index e212de27e4..8316485217 100644 --- a/usr/src/common/openssl/crypto/mem_dbg.c +++ b/usr/src/common/openssl/crypto/mem_dbg.c @@ -59,11 +59,11 @@ #include <stdio.h> #include <stdlib.h> #include <time.h> +#include "cryptlib.h" #include <openssl/crypto.h> #include <openssl/buffer.h> #include <openssl/bio.h> #include <openssl/lhash.h> -#include "cryptlib.h" static int mh_mode=CRYPTO_MEM_CHECK_OFF; /* The state changes to CRYPTO_MEM_CHECK_ON | CRYPTO_MEM_CHECK_ENABLE @@ -252,8 +252,16 @@ long CRYPTO_dbg_get_options(void) /* static int mem_cmp(MEM *a, MEM *b) */ static int mem_cmp(const void *a_void, const void *b_void) { +#ifdef _WIN64 + const char *a=(const char *)((const MEM *)a_void)->addr, + *b=(const char *)((const MEM *)b_void)->addr; + if (a==b) return 0; + else if (a>b) return 1; + else return -1; +#else return((const char *)((const MEM *)a_void)->addr - (const char *)((const MEM *)b_void)->addr); +#endif } /* static unsigned long mem_hash(MEM *a) */ |