git: 4baeb8561907 - main - mail/cyrus-imapd3{8,10,12}: Trying to fix build on FreeBSD 13.X.

From: Hajimu UMEMOTO <ume_at_FreeBSD.org>
Date: Mon, 30 Jun 2025 17:10:47 UTC
The branch main has been updated by ume:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4baeb85619071d5242c6d70bf597bc23b5d250a7

commit 4baeb85619071d5242c6d70bf597bc23b5d250a7
Author:     Hajimu UMEMOTO <ume@FreeBSD.org>
AuthorDate: 2025-06-30 17:08:01 +0000
Commit:     Hajimu UMEMOTO <ume@FreeBSD.org>
CommitDate: 2025-06-30 17:10:42 +0000

    mail/cyrus-imapd3{8,10,12}: Trying to fix build on FreeBSD 13.X.
---
 mail/cyrus-imapd310/files/patch-imap__httpd.c | 25 +++++++++++++++++++++++++
 mail/cyrus-imapd312/files/patch-imap__httpd.c | 25 +++++++++++++++++++++++++
 mail/cyrus-imapd38/files/patch-imap__httpd.c  | 25 +++++++++++++++++++++++++
 3 files changed, 75 insertions(+)

diff --git a/mail/cyrus-imapd310/files/patch-imap__httpd.c b/mail/cyrus-imapd310/files/patch-imap__httpd.c
new file mode 100644
index 000000000000..efec7547cc68
--- /dev/null
+++ b/mail/cyrus-imapd310/files/patch-imap__httpd.c
@@ -0,0 +1,25 @@
+--- imap/httpd.c.orig	2025-06-27 04:15:42 UTC
++++ imap/httpd.c
+@@ -1286,7 +1286,22 @@ static int tls_init(int client_auth, struct buf *serve
+ 
+ static int tls_init(int client_auth, struct buf *serverinfo)
+ {
++#ifdef OPENSSL_FULL_VERSION_STR
+     buf_printf(serverinfo, " OpenSSL/%s", OPENSSL_FULL_VERSION_STR);
++#else
++    unsigned long version = OPENSSL_VERSION_NUMBER;
++    unsigned int status   = version & 0x0f; version >>= 4;
++    unsigned int patch    = version & 0xff; version >>= 8;
++    unsigned int fix      = version & 0xff; version >>= 8;
++    unsigned int minor    = version & 0xff; version >>= 8;
++    unsigned int major    = version & 0xff;
++
++    buf_printf(serverinfo, " OpenSSL/%u.%u.%u", major, minor, fix);
++
++    if (status == 0) buf_appendcstr(serverinfo, "-dev");
++    else if (status < 15) buf_printf(serverinfo, "-beta%u", status);
++    else if (patch) buf_putc(serverinfo, patch + 'a' - 1);
++#endif
+ 
+     if (!tls_enabled()) return HTTP_UNAVAILABLE;
+ 
diff --git a/mail/cyrus-imapd312/files/patch-imap__httpd.c b/mail/cyrus-imapd312/files/patch-imap__httpd.c
new file mode 100644
index 000000000000..efec7547cc68
--- /dev/null
+++ b/mail/cyrus-imapd312/files/patch-imap__httpd.c
@@ -0,0 +1,25 @@
+--- imap/httpd.c.orig	2025-06-27 04:15:42 UTC
++++ imap/httpd.c
+@@ -1286,7 +1286,22 @@ static int tls_init(int client_auth, struct buf *serve
+ 
+ static int tls_init(int client_auth, struct buf *serverinfo)
+ {
++#ifdef OPENSSL_FULL_VERSION_STR
+     buf_printf(serverinfo, " OpenSSL/%s", OPENSSL_FULL_VERSION_STR);
++#else
++    unsigned long version = OPENSSL_VERSION_NUMBER;
++    unsigned int status   = version & 0x0f; version >>= 4;
++    unsigned int patch    = version & 0xff; version >>= 8;
++    unsigned int fix      = version & 0xff; version >>= 8;
++    unsigned int minor    = version & 0xff; version >>= 8;
++    unsigned int major    = version & 0xff;
++
++    buf_printf(serverinfo, " OpenSSL/%u.%u.%u", major, minor, fix);
++
++    if (status == 0) buf_appendcstr(serverinfo, "-dev");
++    else if (status < 15) buf_printf(serverinfo, "-beta%u", status);
++    else if (patch) buf_putc(serverinfo, patch + 'a' - 1);
++#endif
+ 
+     if (!tls_enabled()) return HTTP_UNAVAILABLE;
+ 
diff --git a/mail/cyrus-imapd38/files/patch-imap__httpd.c b/mail/cyrus-imapd38/files/patch-imap__httpd.c
new file mode 100644
index 000000000000..efec7547cc68
--- /dev/null
+++ b/mail/cyrus-imapd38/files/patch-imap__httpd.c
@@ -0,0 +1,25 @@
+--- imap/httpd.c.orig	2025-06-27 04:15:42 UTC
++++ imap/httpd.c
+@@ -1286,7 +1286,22 @@ static int tls_init(int client_auth, struct buf *serve
+ 
+ static int tls_init(int client_auth, struct buf *serverinfo)
+ {
++#ifdef OPENSSL_FULL_VERSION_STR
+     buf_printf(serverinfo, " OpenSSL/%s", OPENSSL_FULL_VERSION_STR);
++#else
++    unsigned long version = OPENSSL_VERSION_NUMBER;
++    unsigned int status   = version & 0x0f; version >>= 4;
++    unsigned int patch    = version & 0xff; version >>= 8;
++    unsigned int fix      = version & 0xff; version >>= 8;
++    unsigned int minor    = version & 0xff; version >>= 8;
++    unsigned int major    = version & 0xff;
++
++    buf_printf(serverinfo, " OpenSSL/%u.%u.%u", major, minor, fix);
++
++    if (status == 0) buf_appendcstr(serverinfo, "-dev");
++    else if (status < 15) buf_printf(serverinfo, "-beta%u", status);
++    else if (patch) buf_putc(serverinfo, patch + 'a' - 1);
++#endif
+ 
+     if (!tls_enabled()) return HTTP_UNAVAILABLE;
+