mongoc_socket_errno(3) on Linux
The text d768bec6ef4e, as Debian 9 (Stretch) shipped it.
This function returns the currently captured errno for a socket. This may be useful to check was the last errno was after another function call has been made that clears the threads errno variable.