git: 6002b822319d - main - sysutils/istatserver: Fix build with openssl3

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Wed, 26 Jul 2023 15:04:14 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6002b822319d2723bb25dad959951a0b0e8d8254

commit 6002b822319d2723bb25dad959951a0b0e8d8254
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-07-26 14:44:10 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-07-26 15:04:02 +0000

    sysutils/istatserver: Fix build with openssl3
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 sysutils/istatserver/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sysutils/istatserver/Makefile b/sysutils/istatserver/Makefile
index 3c761c6dfc9a..88601a28bdec 100644
--- a/sysutils/istatserver/Makefile
+++ b/sysutils/istatserver/Makefile
@@ -22,6 +22,12 @@ GROUPS=		istat
 
 SUB_FILES=	pkg-message
 
+.include <bsd.port.pre.mk>
+
+.if ( ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400092 && ${SSL_DEFAULT} == base ) || ${SSL_DEFAULT:Mopenssl3*}
+CXXFLAGS+=	-DOPENSSL_API_COMPAT=0x30000000L"
+.endif
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/istatserver ${STAGEDIR}${PREFIX}/bin
 	${MKDIR} ${STAGEDIR}${PREFIX}/etc/istatserver
@@ -35,4 +41,4 @@ do-install:
 			${STAGEDIR}${MANPREFIX}/man/man5
 	@${ECHO_CMD} '@postexec ${CHOWN} -R ${USERS}:${GROUPS} %D/etc/istatserver' >> ${TMPPLIST}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>