commit 4bc2d65: [Minor] Try to deal with some deprecations
Vsevolod Stakhov
vsevolod at rspamd.com
Thu Sep 15 22:07:03 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-09-15 22:50:49 +0100
URL: https://github.com/rspamd/rspamd/commit/4bc2d652db7130ace5f7a44fda0f42ca8bef4bae
[Minor] Try to deal with some deprecations
---
src/libserver/cfg_utils.c | 2 +-
src/libserver/ssl_util.c | 2 +-
src/rspamadm/signtool.c | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 5943ffdee..f3d5e391d 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -2641,7 +2641,7 @@ rspamd_init_libs (void)
if ((ctx->crypto_ctx->cpu_config & CPUID_RDRAND) == 0) {
ottery_config_disable_entropy_sources (ottery_cfg,
OTTERY_ENTROPY_SRC_RDRAND);
-#if OPENSSL_VERSION_NUMBER >= 0x1000104fL && !defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x1000104fL && OPENSSL_VERSION_NUMBER < 0x30000000L && !defined(LIBRESSL_VERSION_NUMBER)
RAND_set_rand_engine (NULL);
#endif
}
diff --git a/src/libserver/ssl_util.c b/src/libserver/ssl_util.c
index d82d944b3..8ffd9fde5 100644
--- a/src/libserver/ssl_util.c
+++ b/src/libserver/ssl_util.c
@@ -1071,7 +1071,7 @@ rspamd_openssl_maybe_init (void)
OpenSSL_add_all_digests ();
OpenSSL_add_all_ciphers ();
-#if OPENSSL_VERSION_NUMBER >= 0x1000104fL && !defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x1000104fL && OPENSSL_VERSION_NUMBER < 0x30000000L && !defined(LIBRESSL_VERSION_NUMBER)
ENGINE_load_builtin_engines ();
#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
diff --git a/src/rspamadm/signtool.c b/src/rspamadm/signtool.c
index 678ee42a6..b28c36c8c 100644
--- a/src/rspamadm/signtool.c
+++ b/src/rspamadm/signtool.c
@@ -221,7 +221,11 @@ rspamadm_edit_file (const gchar *fname)
}
#if GLIB_MAJOR_VERSION >= 2 && GLIB_MINOR_VERSION >= 34
+# if GLIB_MINOR_VERSION >= 70
+ if (!g_spawn_check_wait_status (retcode, &err)) {
+# else
if (!g_spawn_check_exit_status (retcode, &err)) {
+# endif
unlink (tmppath);
rspamd_fprintf (stderr, "%s returned error code: %d - %e\n", editor,
retcode, err);
More information about the Commits
mailing list