summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libcrypto/bn/bn_isqrt.c6
-rw-r--r--lib/libcrypto/crypto_lock.c7
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/libcrypto/bn/bn_isqrt.c b/lib/libcrypto/bn/bn_isqrt.c
index 4a757b02ceb..1dff1b05622 100644
--- a/lib/libcrypto/bn/bn_isqrt.c
+++ b/lib/libcrypto/bn/bn_isqrt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn_isqrt.c,v 1.7 2023/03/27 10:25:02 tb Exp $ */
+/* $OpenBSD: bn_isqrt.c,v 1.8 2023/05/17 07:42:38 tb Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
*
@@ -22,9 +22,7 @@
#include <openssl/err.h>
#include "bn_local.h"
-
-#define CTASSERT(x) extern char _ctassert[(x) ? 1 : -1 ] \
- __attribute__((__unused__))
+#include "crypto_internal.h"
/*
* Calculate integer square root of |n| using a variant of Newton's method.
diff --git a/lib/libcrypto/crypto_lock.c b/lib/libcrypto/crypto_lock.c
index 5d317a81c00..5b1d1b090ba 100644
--- a/lib/libcrypto/crypto_lock.c
+++ b/lib/libcrypto/crypto_lock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crypto_lock.c,v 1.2 2018/11/28 15:51:32 jsing Exp $ */
+/* $OpenBSD: crypto_lock.c,v 1.3 2023/05/17 07:42:38 tb Exp $ */
/*
* Copyright (c) 2018 Brent Cook <bcook@openbsd.org>
*
@@ -19,6 +19,8 @@
#include <openssl/crypto.h>
+#include "crypto_internal.h"
+
static pthread_mutex_t locks[] = {
PTHREAD_MUTEX_INITIALIZER,
PTHREAD_MUTEX_INITIALIZER,
@@ -63,9 +65,6 @@ static pthread_mutex_t locks[] = {
PTHREAD_MUTEX_INITIALIZER,
};
-#define CTASSERT(x) extern char _ctassert[(x) ? 1 : -1 ] \
- __attribute__((__unused__))
-
CTASSERT((sizeof(locks) / sizeof(*locks)) == CRYPTO_NUM_LOCKS);
void