ZMQ\_ERRNO(3) 0MQ Manual ZMQ\_ERRNO(3)

# [NAME](#NAME)

zmq\_errno - retrieve value of errno for the calling thread

# [SYNOPSIS](#SYNOPSIS)

**int zmq\_errno (void);**

# [DESCRIPTION](#DESCRIPTION)

The *zmq\_errno()* function shall retrieve the value of the *errno* variable for the calling thread.

The *zmq\_errno()* function is provided to assist users on non-POSIX systems who are experiencing issues with retrieving the correct value of *errno* directly. Specifically, users on Win32 systems whose application is using a different C run-time library from the C run-time library in use by 0MQ will need to use *zmq\_errno()* for correct operation.

**Important**

Users not experiencing issues with retrieving the correct value of *errno* should not use this function and should instead access the *errno* variable directly.

# [RETURN VALUE](#RETURN_VALUE)

The *zmq\_errno()* function shall return the value of the *errno* variable for the calling thread.

# [ERRORS](#ERRORS)

No errors are defined.

# [SEE ALSO](#SEE_ALSO)

[**zmq**(7)](/man/os/zeromq/zmq.7)

# [AUTHORS](#AUTHORS)

This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at **http://www.zeromq.org/docs:contributing**.

10/26/2026 0MQ 4.3.5

---

Document: zmq_errno(3) from zeromq 4.3.5-r15 (Chainguard OS)
Source: https://github.com/zeromq/libzmq
