commit:     7e539010154b1efd978198ddd8902cfc0a5be957
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Mon Oct 22 17:31:15 2018 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Oct 22 17:31:30 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e539010

net-misc/openssh: Fix openssl-1.0.2 patch to fix libressl as well

This also adds a patch to fix a bunch of QA warnings with USE=-ssl

Closes: https://bugs.gentoo.org/669052
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../files/openssh-7.9_p1-include-stdlib.patch      | 48 ++++++++++++++++++++++
 .../openssh-7.9_p1-openssl-1.0.2-compat.patch      |  4 +-
 net-misc/openssh/openssh-7.9_p1.ebuild             |  1 +
 3 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/net-misc/openssh/files/openssh-7.9_p1-include-stdlib.patch 
b/net-misc/openssh/files/openssh-7.9_p1-include-stdlib.patch
new file mode 100644
index 00000000000..c5697c2b8bd
--- /dev/null
+++ b/net-misc/openssh/files/openssh-7.9_p1-include-stdlib.patch
@@ -0,0 +1,48 @@
+diff --git a/auth-options.c b/auth-options.c
+index b05d6d6f..d1f42f04 100644
+--- a/auth-options.c
++++ b/auth-options.c
+@@ -26,6 +26,7 @@
+ #include <stdarg.h>
+ #include <ctype.h>
+ #include <limits.h>
++#include <stdlib.h>
+ 
+ #include "openbsd-compat/sys-queue.h"
+ 
+diff --git a/hmac.c b/hmac.c
+index 1c879640..a29f32c5 100644
+--- a/hmac.c
++++ b/hmac.c
+@@ -19,6 +19,7 @@
+ 
+ #include <sys/types.h>
+ #include <string.h>
++#include <stdlib.h>
+ 
+ #include "sshbuf.h"
+ #include "digest.h"
+diff --git a/krl.c b/krl.c
+index 8e2d5d5d..c32e147a 100644
+--- a/krl.c
++++ b/krl.c
+@@ -28,6 +28,7 @@
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <stdlib.h>
+ 
+ #include "sshbuf.h"
+ #include "ssherr.h"
+diff --git a/mac.c b/mac.c
+index 51dc11d7..3d11eba6 100644
+--- a/mac.c
++++ b/mac.c
+@@ -29,6 +29,7 @@
+ 
+ #include <string.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ 
+ #include "digest.h"
+ #include "hmac.h"

diff --git a/net-misc/openssh/files/openssh-7.9_p1-openssl-1.0.2-compat.patch 
b/net-misc/openssh/files/openssh-7.9_p1-openssl-1.0.2-compat.patch
index 9fc6d0a9dce..c1c310e8f14 100644
--- a/net-misc/openssh/files/openssh-7.9_p1-openssl-1.0.2-compat.patch
+++ b/net-misc/openssh/files/openssh-7.9_p1-openssl-1.0.2-compat.patch
@@ -5,9 +5,9 @@ index 8b4a3627..590b66d1 100644
 @@ -76,7 +76,7 @@ ssh_OpenSSL_add_all_algorithms(void)
        ENGINE_load_builtin_engines();
        ENGINE_register_all_complete();
- 
+
 -#if OPENSSL_VERSION_NUMBER < 0x10001000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
        OPENSSL_config(NULL);
  #else
        OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |

diff --git a/net-misc/openssh/openssh-7.9_p1.ebuild 
b/net-misc/openssh/openssh-7.9_p1.ebuild
index e92fbbc06ee..c38afd6020c 100644
--- a/net-misc/openssh/openssh-7.9_p1.ebuild
+++ b/net-misc/openssh/openssh-7.9_p1.ebuild
@@ -114,6 +114,7 @@ src_prepare() {
        sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
 
        eapply "${FILESDIR}"/${PN}-7.9_p1-openssl-1.0.2-compat.patch
+       eapply "${FILESDIR}"/${PN}-7.9_p1-include-stdlib.patch
        eapply "${FILESDIR}"/${PN}-7.8_p1-GSSAPI-dns.patch #165444 integrated 
into gsskex
        eapply "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch
        eapply "${FILESDIR}"/${PN}-7.5_p1-disable-conch-interop-tests.patch

Reply via email to