From b59422fa9455e2e9e73345085f24721ac9388fee Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 21 Jul 2008 15:29:02 -0600 Subject: [PATCH] fix windows build, where hstrerror is not available --- classpath/java-nio.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classpath/java-nio.cpp b/classpath/java-nio.cpp index 0ae031606b..e82f34f0dd 100644 --- a/classpath/java-nio.cpp +++ b/classpath/java-nio.cpp @@ -95,7 +95,11 @@ init(JNIEnv* e, sockaddr_in* address, jstring hostString, jint port) hostent* host = gethostbyname(chars); e->ReleaseStringUTFChars(hostString, chars); if (host == 0) { +#ifdef WIN32 + throwIOException(e); +#else throwIOException(e, hstrerror(h_errno)); +#endif return; } memset(address, 0, sizeof(sockaddr_in));