summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-05-17 13:15:01 +0100
committerHugo Landau <hlandau@openssl.org>2023-05-24 10:34:54 +0100
commit629b408c12c56b2c9e3279de8658718e8dd658a2 (patch)
tree13916b230422a8d1b27fcf9467ce8bbdcb45646f /include
parent1a0de4c1eea1f32a3e1113add26625d49b3854d8 (diff)
QUIC: Fix bugs where threading is disabled
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20856)
Diffstat (limited to 'include')
-rw-r--r--include/internal/cryptlib.h1
-rw-r--r--include/internal/refcount.h2
-rw-r--r--include/openssl/crypto.h.in1
3 files changed, 3 insertions, 1 deletions
diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
index 700f387531..5aeb4fe0f2 100644
--- a/include/internal/cryptlib.h
+++ b/include/internal/cryptlib.h
@@ -159,4 +159,5 @@ char *ossl_ipaddr_to_asc(unsigned char *p, int len);
char *ossl_buf2hexstr_sep(const unsigned char *buf, long buflen, char sep);
unsigned char *ossl_hexstr2buf_sep(const char *str, long *buflen,
const char sep);
+
#endif
diff --git a/include/internal/refcount.h b/include/internal/refcount.h
index 15f33d8c02..b74c283ae5 100644
--- a/include/internal/refcount.h
+++ b/include/internal/refcount.h
@@ -197,7 +197,7 @@ typedef int CRYPTO_REF_COUNT;
# define CRYPTO_UP_REF(val, ret, lock) CRYPTO_atomic_add(val, 1, ret, lock)
# define CRYPTO_DOWN_REF(val, ret, lock) CRYPTO_atomic_add(val, -1, ret, lock)
-# define CRYPTO_GET_REF(val, ret, lock) CRYPTO_atomic_load(val, ret, lock)
+# define CRYPTO_GET_REF(val, ret, lock) CRYPTO_atomic_load_int(val, ret, lock)
# endif
diff --git a/include/openssl/crypto.h.in b/include/openssl/crypto.h.in
index 963bc635fb..fb67281133 100644
--- a/include/openssl/crypto.h.in
+++ b/include/openssl/crypto.h.in
@@ -89,6 +89,7 @@ int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock);
int CRYPTO_atomic_or(uint64_t *val, uint64_t op, uint64_t *ret,
CRYPTO_RWLOCK *lock);
int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock);
+int CRYPTO_atomic_load_int(int *val, int *ret, CRYPTO_RWLOCK *lock);
/* No longer needed, so this is a no-op */
#define OPENSSL_malloc_init() while(0) continue