[Asterisk-code-review] main/iostream.c: fix build with libressl (asterisk[20])
Sean Bright
asteriskteam at digium.com
Wed Mar 1 14:12:34 CST 2023
Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/19948 )
Change subject: main/iostream.c: fix build with libressl
......................................................................
main/iostream.c: fix build with libressl
Fix the following build failure with libressl by using SSL_is_server
which is available since version 2.7.0 and
https://github.com/libressl-portable/openbsd/commit/d7ec516916c5eaac29b02d7a8ac6570f63b458f7:
iostream.c: In function 'ast_iostream_close':
iostream.c:559:41: error: invalid use of incomplete typedef 'SSL' {aka 'struct ssl_st'}
559 | if (!stream->ssl->server) {
| ^~
ASTERISK-30107 #close
Fixes: - http://autobuild.buildroot.org/results/ce4d62d00bb77ba5b303cacf6be7e350581a62f9
Change-Id: Iea7f34970297f2fb50285d73462d0174ba7e9587
---
M main/iostream.c
1 file changed, 22 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/48/19948/1
diff --git a/main/iostream.c b/main/iostream.c
index d060b6d..7727983 100644
--- a/main/iostream.c
+++ b/main/iostream.c
@@ -553,7 +553,7 @@
ERR_error_string(sslerr, err), ssl_error_to_string(sslerr, res));
}
-#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+#if !(defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x2070000L)) && (OPENSSL_VERSION_NUMBER >= 0x10100000L)
if (!SSL_is_server(stream->ssl)) {
#else
if (!stream->ssl->server) {
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19948
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 20
Gerrit-Change-Id: Iea7f34970297f2fb50285d73462d0174ba7e9587
Gerrit-Change-Number: 19948
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-CC: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230301/53a7c0d2/attachment-0001.html>
More information about the asterisk-code-review
mailing list