mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
fix windows build, where hstrerror is not available
This commit is contained in:
parent
5b94b17ea2
commit
b59422fa94
@ -95,7 +95,11 @@ init(JNIEnv* e, sockaddr_in* address, jstring hostString, jint port)
|
|||||||
hostent* host = gethostbyname(chars);
|
hostent* host = gethostbyname(chars);
|
||||||
e->ReleaseStringUTFChars(hostString, chars);
|
e->ReleaseStringUTFChars(hostString, chars);
|
||||||
if (host == 0) {
|
if (host == 0) {
|
||||||
|
#ifdef WIN32
|
||||||
|
throwIOException(e);
|
||||||
|
#else
|
||||||
throwIOException(e, hstrerror(h_errno));
|
throwIOException(e, hstrerror(h_errno));
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memset(address, 0, sizeof(sockaddr_in));
|
memset(address, 0, sizeof(sockaddr_in));
|
||||||
|
Loading…
Reference in New Issue
Block a user