Bug 260154

Summary: irc/znc: fix build using LibreSSL 3.4.2
Product: Ports & Packages Reporter: wcarson.bugzilla
Component: Individual Port(s)Assignee: Danilo G. Baio <dbaio>
Status: Closed FIXED    
Severity: Affects Some People CC: wcarson.bugzilla
Priority: --- Flags: dbaio: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Fix build with libressl none

Description wcarson.bugzilla 2021-12-01 02:53:48 UTC
Created attachment 229826 [details]
Fix build with libressl

irc/znc 1.8.2 fails to build against LibreSSL 3.4.2, which was resolved upstream in commit dcb5f3df82fcfec48aab356252067dc897fb98cf:

https://github.com/znc/znc/commit/dcb5f3df82fcfec48aab356252067dc897fb98cf

They did not roll a new version, though, so I integrated the patches to get it building again.

Error:

--- modules/CMakeFiles/module_schat.dir/all ---
/wrkdirs/usr/ports/irc/znc/work/znc-1.8.2/modules/schat.cpp:227:40: error: member access into incomplete type 'SSL_SESSION' (aka 'ssl_session_st')
                            pSession ? SSL_SESSION_get0_cipher(pSession)
                                       ^
/wrkdirs/usr/ports/irc/znc/work/znc-1.8.2/modules/schat.cpp:33:55: note: expanded from macro 'SSL_SESSION_get0_cipher'
# define SSL_SESSION_get0_cipher(pSession) ((pSession)->cipher)
                                                      ^
/usr/local/include/openssl/ssl.h:365:16: note: forward declaration of 'ssl_session_st'
typedef struct ssl_session_st SSL_SESSION;
               ^
/wrkdirs/usr/ports/irc/znc/work/znc-1.8.2/modules/schat.cpp:291:40: error: member access into incomplete type 'SSL_SESSION' (aka 'ssl_session_st')
                            pSession ? SSL_SESSION_get0_cipher(pSession)
                                       ^
/wrkdirs/usr/ports/irc/znc/work/znc-1.8.2/modules/schat.cpp:33:55: note: expanded from macro 'SSL_SESSION_get0_cipher'
# define SSL_SESSION_get0_cipher(pSession) ((pSession)->cipher)
                                                      ^
/usr/local/include/openssl/ssl.h:365:16: note: forward declaration of 'ssl_session_st'
typedef struct ssl_session_st SSL_SESSION;
               ^

https://github.com/znc/znc/commit/dcb5f3df82fcfec48aab356252067dc897fb98cf
Comment 1 commit-hook freebsd_committer 2021-12-05 22:05:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3abe08bbd4193809139b5ba9e494b5a59a01afe0

commit 3abe08bbd4193809139b5ba9e494b5a59a01afe0
Author:     Danilo G. Baio <dbaio@FreeBSD.org>
AuthorDate: 2021-12-05 21:56:23 +0000
Commit:     Danilo G. Baio <dbaio@FreeBSD.org>
CommitDate: 2021-12-05 22:04:21 +0000

    irc/znc: Fix build with LibreSSL

    PR:             260154
    Reported by:    wcarson.bugzilla@disillusion.net

 irc/znc/Makefile | 4 ++++
 irc/znc/distinfo | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)
Comment 2 Danilo G. Baio freebsd_committer 2021-12-05 22:06:09 UTC
Committed, thanks!