diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2015-06-27 22:42:03 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2015-06-27 22:42:03 +0000 |
commit | 09046d60457cd92debe24d6be32d9acd43c2134c (patch) | |
tree | 5839b1a57b274986f9cbc95601113aecdbe89a97 /lib/libssl | |
parent | f5a1987baf5bbc64e16e1f659eedbeb1e22dca48 (diff) |
Fix pointer to unsigned long conversion.
bcook@ notes that this check really only impacted 64-bit Windows. Also,
changed the check to be unsigned for consistency.
ok bcook@
Diffstat (limited to 'lib/libssl')
-rw-r--r-- | lib/libssl/src/crypto/cryptlib.c | 8 | ||||
-rw-r--r-- | lib/libssl/ssl/Makefile | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/libssl/src/crypto/cryptlib.c b/lib/libssl/src/crypto/cryptlib.c index dc92ac89fea..896e3d39cfc 100644 --- a/lib/libssl/src/crypto/cryptlib.c +++ b/lib/libssl/src/crypto/cryptlib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptlib.c,v 1.34 2015/01/22 03:56:27 bcook Exp $ */ +/* $OpenBSD: cryptlib.c,v 1.35 2015/06/27 22:42:02 doug Exp $ */ /* ==================================================================== * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. * @@ -114,7 +114,9 @@ * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. */ +#include <limits.h> #include <stdarg.h> +#include <stdint.h> #include <string.h> #include <unistd.h> @@ -431,9 +433,9 @@ CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr) { memset(id, 0, sizeof(*id)); id->ptr = ptr; -#if LONG_MAX >= INTPTR_MAX +#if ULONG_MAX >= UINTPTR_MAX /*s u 'ptr' can be embedded in 'val' without loss of uniqueness */ - id->val = (unsigned long)id->ptr; + id->val = (uintptr_t)id->ptr; #else { SHA256_CTX ctx; diff --git a/lib/libssl/ssl/Makefile b/lib/libssl/ssl/Makefile index a13fcdf512d..0ff974e4de9 100644 --- a/lib/libssl/ssl/Makefile +++ b/lib/libssl/ssl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.52 2015/06/05 21:42:37 tobiasu Exp $ +# $OpenBSD: Makefile,v 1.53 2015/06/27 22:42:02 doug Exp $ LIB= ssl @@ -6,7 +6,7 @@ SSL_SRC= ${.CURDIR}/../../libssl/src LSSL_SRC= ${SSL_SRC}/ssl .include <bsd.own.mk> -CFLAGS+= -Wall +CFLAGS+= -Wall -Wundef .if ${COMPILER_VERSION:L} != "gcc3" CFLAGS+= -Werror .endif |