commit:     37b18c77e0c5b7705f5f6a45ea99ba897a3c0d70
Author:     Yang Yang <geraint0923 <AT> gmail <DOT> com>
AuthorDate: Mon Nov  1 17:27:05 2021 +0000
Commit:     Amy Liffey <amynka <AT> gentoo <DOT> org>
CommitDate: Mon Nov  8 18:23:33 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37b18c77

net-misc/mosh: add patch to enable the compilation with clang

Fix is introduced to mosh official at:
https://github.com/mobile-shell/mosh/commit/e5f8a826ef9ff5da4cfce3bb8151f9526ec19db0
Closes: https://github.com/gentoo/gentoo/pull/22787

Signed-off-by: Yang Yang <geraint0923 <AT> gmail.com>
Signed-off-by: Amy Liffey <amynka <AT> gentoo.org>

 net-misc/mosh/files/mosh-1.3.2-bind-misinterpret.patch       | 11 +++++++++++
 net-misc/mosh/{mosh-1.3.2-r1.ebuild => mosh-1.3.2-r2.ebuild} |  1 +
 2 files changed, 12 insertions(+)

diff --git a/net-misc/mosh/files/mosh-1.3.2-bind-misinterpret.patch 
b/net-misc/mosh/files/mosh-1.3.2-bind-misinterpret.patch
new file mode 100644
index 00000000000..0203cfff6b2
--- /dev/null
+++ b/net-misc/mosh/files/mosh-1.3.2-bind-misinterpret.patch
@@ -0,0 +1,11 @@
+--- a/src/network/network.cc
++++ b/src/network/network.cc
+@@ -335,7 +335,7 @@ bool Connection::try_bind( const char *addr, int port_low, 
int port_high )
+       }
+     }
+ 
+-    if ( bind( sock(), &local_addr.sa, local_addr_len ) == 0 ) {
++    if ( ::bind( sock(), &local_addr.sa, local_addr_len ) == 0 ) {
+       set_MTU( local_addr.sa.sa_family );
+       return true;
+     } else if ( i == search_high ) { /* last port to search */

diff --git a/net-misc/mosh/mosh-1.3.2-r1.ebuild 
b/net-misc/mosh/mosh-1.3.2-r2.ebuild
similarity index 97%
rename from net-misc/mosh/mosh-1.3.2-r1.ebuild
rename to net-misc/mosh/mosh-1.3.2-r2.ebuild
index 469c7b1f214..710a8c1fe27 100644
--- a/net-misc/mosh/mosh-1.3.2-r1.ebuild
+++ b/net-misc/mosh/mosh-1.3.2-r2.ebuild
@@ -37,6 +37,7 @@ DEPEND="${RDEPEND}
 # [0] - avoid sandbox-violation calling git describe in Makefile.
 PATCHES=(
        "${FILESDIR}"/${PN}-1.2.5-git-version.patch
+       "${FILESDIR}"/${P}-bind-misinterpret.patch
 )
 
 src_prepare() {

Reply via email to