summaryrefslogtreecommitdiffstats
path: root/libjava/gnu/java/nio/SocketChannelSelectionKey.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/gnu/java/nio/SocketChannelSelectionKey.java')
-rw-r--r--libjava/gnu/java/nio/SocketChannelSelectionKey.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/gnu/java/nio/SocketChannelSelectionKey.java b/libjava/gnu/java/nio/SocketChannelSelectionKey.java
index 13affef2474..75b4dfd87e5 100644
--- a/libjava/gnu/java/nio/SocketChannelSelectionKey.java
+++ b/libjava/gnu/java/nio/SocketChannelSelectionKey.java
@@ -51,6 +51,8 @@ public final class SocketChannelSelectionKey
public int getNativeFD()
{
- return ((SocketChannelImpl) ch).getNativeFD();
+ NIOSocket socket =
+ (NIOSocket) ((SocketChannelImpl) ch).socket();
+ return socket.getPlainSocketImpl().getNativeFD();
}
}
OpenPOWER on IntegriCloud