postfix: Fix compilation without OpenSSL ENGINE 7843/head
authorRosen Penev <rosenp@gmail.com>
Wed, 2 Jan 2019 07:39:03 +0000 (23:39 -0800)
committerRosen Penev <rosenp@gmail.com>
Wed, 2 Jan 2019 07:39:03 +0000 (23:39 -0800)
While ENGINE is not actually used, the header being included
unconditionally as well as the cleanup function being called breaks
compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
mail/postfix/Makefile
mail/postfix/patches/110-openssl-engine.patch [new file with mode: 0644]

index ec3b32865e24ce29f0d8b812ead8abf5511b25e0..6dc3f255cceeb50e9dce97873e9013f112d5dd95 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postfix
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_VERSION:=3.3.2
 PKG_SOURCE_URL:= \
        https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \
diff --git a/mail/postfix/patches/110-openssl-engine.patch b/mail/postfix/patches/110-openssl-engine.patch
new file mode 100644 (file)
index 0000000..95956ea
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/src/posttls-finger/posttls-finger.c
++++ b/src/posttls-finger/posttls-finger.c
+@@ -374,7 +374,9 @@
+ #include <tls.h>
+ #ifdef USE_TLS
++#ifndef OPENSSL_NO_ENGINE
+ #include <openssl/engine.h>
++#endif
+ #endif
+  /*
+@@ -1524,7 +1526,9 @@ static void ssl_cleanup(void)
+ #else
+     ERR_remove_state(0);              /* Deprecated with OpenSSL 1.0.0 */
+ #endif
++#ifndef OPENSSL_NO_ENGINE
+     ENGINE_cleanup();
++#endif
+     CONF_modules_unload(1);
+     ERR_free_strings();
+     EVP_cleanup();