Remove warnings on PG13 + OpenSSL 3.0

OpenSSL 3.0 has marked some functions that we use as deprecated, but we
want to continue support OpenSSL 1.0.1 for the time being too. This
indicates that to OpenSSL 3.0, so it doesn't show warnings.

(cherry picked from commit 58e8da8339a4540dff4baf589ab6efc506ac2e6b)
release-10.2-fix-for-move-pg-dist-object
Jelte Fennema 2022-06-29 11:27:19 +02:00 committed by Onur Tirtir
parent 1a5fb8a9a6
commit c0d2c7be44
1 changed files with 13 additions and 0 deletions

View File

@ -8,6 +8,19 @@
*-------------------------------------------------------------------------
*/
/*
* Make sure that functions marked as deprecated in OpenSSL 3.0 don't trigger
* deprecation warnings by indicating that we're using the OpenSSL 1.0.1
* compatibile API. Postgres does this by already in PG14, so we should not do
* it otherwise we get warnings about redefining this value.
*/
#if PG_VERSION_NUM < PG_VERSION_14
#ifndef OPENSSL_API_COMPAT
#define OPENSSL_API_COMPAT 0x1000100L
#endif
#endif
#include "postgres.h"
#include "distributed/connection_management.h"