openssl30-warnings-pg13.patch

text/x-diff

Filename: openssl30-warnings-pg13.patch
Type: text/x-diff
Part: 0
Message: Remove deprecation warnings when compiling PG ~13 with OpenSSL 3.0~

Patch

Format: unified
File+
src/common/sha2_openssl.c 6 0
diff --git a/src/common/sha2_openssl.c b/src/common/sha2_openssl.c
index 41673b3a88..75f95a9e1f 100644
--- a/src/common/sha2_openssl.c
+++ b/src/common/sha2_openssl.c
@@ -20,6 +20,12 @@
 #include "postgres_fe.h"
 #endif
 
+/*
+ * Suppress deprecation warnings for low-level SHA implementations not
+ * yet removed from OpenSSL.
+ */
+#define OPENSSL_SUPPRESS_DEPRECATED 1
+
 #include <openssl/sha.h>
 
 #include "common/sha2.h"