In the directory native/target/generic:
In file target_generic_network.h,
in macro TARGET_NATIVE_NETWORK_SOCKET_RECEIVE_AVAILABLE,
the result of FIONREAD ioctl is stored in int.
In file target_generic_file.h,
in macro TARGET_NATIVE_FILE_AVAILABLE,
the result of FIONREAD ioctl is stored in ssize_t.
I am not sure which one is correct, but they are inconsistent and one would probably fail on 64-bit systems where int and ssize_t have different sizes.
On most platforms, FIONREAD takes an int*.
However at least one version of Irix requires a size_t*
Note that libgcj simply uses int and we haven't had complaints.