Returns value of errno for the current thread.
On most systems, errno can be accessed directly and this function is not needed. However, on Windows, there are multiple implementations of the CRT library (single-threaded, multi-threaded, release, debug) and each of them has its own instance of errno. Thus, if nanomsg library and the application that uses it link with different versions of CRT library, they dont share same instance of errno. Consequently, error codes set by nanomsg cannot be accessed by the application. To overcome this problem, application can use nn_errno() function to retrieve the nanomsgs value of errno.