diff --git a/classpath/java-net.cpp b/classpath/java-net.cpp index 20ba2890e2..aa30c80b01 100644 --- a/classpath/java-net.cpp +++ b/classpath/java-net.cpp @@ -28,44 +28,44 @@ extern "C" JNIEXPORT SOCKET JNICALL extern "C" JNIEXPORT void JNICALL Java_java_net_Socket_connect(JNIEnv* e, jclass, - SOCKET sock, - long addr, - short port) + jlong sock, + jlong addr, + jshort port) { - connect(e, sock, addr, port); + connect(e, static_cast(sock), addr, port); } extern "C" JNIEXPORT void JNICALL Java_java_net_Socket_bind(JNIEnv* e, jclass, - SOCKET sock, - long addr, - short port) + jlong sock, + jlong addr, + jshort port) { - bind(e, sock, addr, port); + bind(e, static_cast(sock), addr, port); } extern "C" JNIEXPORT void JNICALL - Java_java_net_Socket_abort(JNIEnv* e, jclass, SOCKET sock) + Java_java_net_Socket_abort(JNIEnv* e, jclass, jlong sock) { - abort(e, sock); + abort(e, static_cast(sock)); } extern "C" JNIEXPORT void JNICALL - Java_java_net_Socket_close(JNIEnv* e, jclass, SOCKET sock) + Java_java_net_Socket_close(JNIEnv* e, jclass, jlong sock) { - close(e, sock); + close(e, static_cast(sock)); } extern "C" JNIEXPORT void JNICALL - Java_java_net_Socket_closeOutput(JNIEnv* e, jclass, SOCKET sock) + Java_java_net_Socket_closeOutput(JNIEnv* e, jclass, jlong sock) { - close_output(e, sock); + close_output(e, static_cast(sock)); } extern "C" JNIEXPORT void JNICALL - Java_java_net_Socket_closeInput(JNIEnv* e, jclass, SOCKET sock) + Java_java_net_Socket_closeInput(JNIEnv* e, jclass, jlong sock) { - close_input(e, sock); + close_input(e, static_cast(sock)); } extern "C" JNIEXPORT void JNICALL diff --git a/classpath/java/io/File.java b/classpath/java/io/File.java index 38aab82840..7ff2375fef 100644 --- a/classpath/java/io/File.java +++ b/classpath/java/io/File.java @@ -307,7 +307,7 @@ public class File implements Serializable { private static native String readDir(long handle); - private static native long closeDir(long handle); + private static native void closeDir(long handle);