Merge FreeBSD r220519:
Fix a bug in the userland rpc library, where it would use a negative return value from write to update its position in a buffer.