A DESCRIPTION OF THE PROBLEM :
sun.nio.ch..KQueue.java is using the following constant definitions:
static final int EVFILT_READ = -1;
static final int EVFILT_WRITE = -2;
However on NetBSD values are defined different with sys/event.h:
(since 7.0 upto current 8.0)
#define EVFILT_READ 0U
#define EVFILT_WRITE 1U
It likely is advisable to initialize the constants from native code in a similar way as it is done with the offset values in the same class.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just use NIO based accept on such platform.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
accpat will work correctly
ACTUAL -
accept strangly fails as
underlying kquee will fail with EINVAL
---------- BEGIN SOURCE ----------
e.g. use karaf on NetBSD
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Do not use openjdk on NetBSD platform
FREQUENCY : always
sun.nio.ch..KQueue.java is using the following constant definitions:
static final int EVFILT_READ = -1;
static final int EVFILT_WRITE = -2;
However on NetBSD values are defined different with sys/event.h:
(since 7.0 upto current 8.0)
#define EVFILT_READ 0U
#define EVFILT_WRITE 1U
It likely is advisable to initialize the constants from native code in a similar way as it is done with the offset values in the same class.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just use NIO based accept on such platform.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
accpat will work correctly
ACTUAL -
accept strangly fails as
underlying kquee will fail with EINVAL
---------- BEGIN SOURCE ----------
e.g. use karaf on NetBSD
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Do not use openjdk on NetBSD platform
FREQUENCY : always