From 4b6c71fba19ec7140257cdcb56c2d77cee855f05 Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Mon, 2 Nov 2020 19:11:15 -0500 Subject: [PATCH] occt: fix segfault in OSD_Host::InternetAddress [ci skip] --- srcpkgs/occt/patches/fix-osd-host.patch | 13 +++++++++++++ srcpkgs/occt/template | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/occt/patches/fix-osd-host.patch diff --git a/srcpkgs/occt/patches/fix-osd-host.patch b/srcpkgs/occt/patches/fix-osd-host.patch new file mode 100644 index 0000000000..329e9a2e9e --- /dev/null +++ b/srcpkgs/occt/patches/fix-osd-host.patch @@ -0,0 +1,13 @@ +# gethostbyname returns a nullptr, because the host can't resolve itself + +--- src/OSD/OSD_Host.cxx ++++ src/OSD/OSD_Host.cxx +@@ -124,7 +124,7 @@ TCollection_AsciiString OSD_Host::InternetAddress(){ + + host = HostName(); + memcpy(&internet_address, +- gethostbyname(host.ToCString()), ++ gethostbyname("localhost"), + sizeof(struct hostent)); + + // Gets each bytes into integers diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template index fc6a9fc80d..f9777bfe27 100644 --- a/srcpkgs/occt/template +++ b/srcpkgs/occt/template @@ -1,7 +1,7 @@ # Template file for 'occt' pkgname=occt version=7.4.0p1 -revision=1 +revision=2 _gittag="V${version//./_}" wrksrc=occt-${_gittag} build_style=cmake