Merge "Preserve errno better in native_handle functions."
am: dd6e73f432

Change-Id: Idbaadca2f8cdf450b47fc95a7a127e009a17740d