compatible with new jnxlibc api
updated to new library api