blob: 9109c43fa4fadd9fd4ff7ed57cde71789993776f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
--- src/java.base/bsd/classes/sun/nio/ch/KQueue.java.orig 2026-10-22 00:00:00 UTC
+++ src/java.base/bsd/classes/sun/nio/ch/KQueue.java
@@ -90,7 +90,9 @@
* Returns the file descriptor from a kevent (assuming it is in the ident field)
*/
static int getDescriptor(long address) {
- return unsafe.getInt(address + OFFSET_IDENT);
+ // ident is a uintptr_t: read it at its full width so that the
+ // descriptor is also right on big-endian hosts
+ return (int) unsafe.getAddress(address + OFFSET_IDENT);
}
static short getFilter(long address) {
|