You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cause: On AIX, errno is not thread safe unless _THREAD_SAFE_ERRNO is defined. (Read /usr/include/errno.h for details)
Solution: Add the line "#define _THREAD_SAFE_ERRNO" before every occurrence of "#include <errno.h>".
Doing so in ./native/dispatch.c is enough to get this test to pass.
For perfect correctness, might be necessary to do so in the other places where errno.h is included:
./native/testlib.c
./native/libffi/src/dlmalloc.c
./native/libffi/src/closures.c
Another option would be to change the build scripts to add -D_THREAD_SAFE_ERRNO when calling the C compiler on AIX. (I believe that defining this on all platforms, not just AIX, should be harmless.)
The following test program works fine on, e.g. Linux, but fails on AIX. LastErrorException is not thrown even though call sets errno.
Using GIT master JNA, commit: 2b8773a
oslevel: 7.1.0.0
java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460sr9fp2-20110627_03(SR9 FP2))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr9-20110624_85526 (JIT enabled, AOT enabled)
J9VM - 20110624_085526
JIT - r9_20101028_17488ifx17
GC - 20101027_AA)
JCL - 20110530_01
The text was updated successfully, but these errors were encountered: