occt: fix segfault in OSD_Host::InternetAddress

[ci skip]
This commit is contained in:
Karl Nilsson 2020-11-02 19:11:15 -05:00 committed by Érico Nogueira Rolim
parent 1e5812bdda
commit 4b6c71fba1
2 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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