From: Vsevolod Stakhov Date: Thu, 15 Sep 2022 21:50:49 +0000 (+0100) Subject: [Minor] Try to deal with some deprecations X-Git-Tag: 3.3~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4bc2d652db7130ace5f7a44fda0f42ca8bef4bae;p=rspamd.git [Minor] Try to deal with some deprecations --- 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);