From 358b609e9dfd503cc25985d197a92610cbbe9f3d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 6 Feb 2018 10:34:41 -0500 Subject: Enable (safe) use of zstd static-only APIs We'll only use these when the compile-time version and the run-time version of the zstd library match. Part of ticket 25162. --- src/common/compress_zstd.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/common/compress_zstd.h') diff --git a/src/common/compress_zstd.h b/src/common/compress_zstd.h index 9bca24ded7..8882617c9f 100644 --- a/src/common/compress_zstd.h +++ b/src/common/compress_zstd.h @@ -17,6 +17,8 @@ const char *tor_zstd_get_version_str(void); const char *tor_zstd_get_header_version_str(void); +int tor_zstd_can_use_static_apis(void); + /** Internal state for an incremental Zstandard compression/decompression. */ typedef struct tor_zstd_compress_state_t tor_zstd_compress_state_t; @@ -42,5 +44,9 @@ size_t tor_zstd_get_total_allocation(void); void tor_zstd_init(void); +#ifdef TOR_UNIT_TESTS +void tor_zstd_set_static_apis_disabled_for_testing(int disabled); +#endif + #endif /* !defined(TOR_COMPRESS_ZSTD_H) */ -- cgit v1.2.3-54-g00ecf