rffi's socket(2) wrapper did not preserve errno.

Merged Bitbucket Importer requested to merge bitbucket/merged-pr-458 into branch/default

Created originally on Bitbucket by markrwilliams (Mark Williams)

Was already merged in Bitbucket before import, marked as merged by the import user

Preserve errno, like the other socket system call wrappers, and add a test to ensure the correct errno is raised upon socket failure.

This should work on windows; EPROTONOSUPPORT is an alias for WSAEPROTONOSUPPORT.

Merge request reports