curl\_share\_strerror(3) Library Functions Manual curl\_share\_strerror(3)

# [NAME](#NAME)

curl\_share\_strerror - return string describing error code

# [SYNOPSIS](#SYNOPSIS)

```
#include <curl/curl.h>
const char *curl_share_strerror(CURLSHcode errornum);
```

# [DESCRIPTION](#DESCRIPTION)

The [*curl\_share\_strerror(3)*](/man/os/curl/curl_share_strerror.3) function returns a string describing the *CURLSHcode* error code passed in the argument *errornum*.

# [PROTOCOLS](#PROTOCOLS)

This functionality affects all supported protocols

# [EXAMPLE](#EXAMPLE)

```
int main(void)
{


  CURLSHcode sh;


  CURLSH *share = curl_share_init();


  sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);


  if(sh)


    printf("Error: %s\n", curl_share_strerror(sh));
}
```

# [AVAILABILITY](#AVAILABILITY)

Added in curl 7.12.0

# [RETURN VALUE](#RETURN_VALUE)

A pointer to a null-terminated string.

# [SEE ALSO](#SEE_ALSO)

[**curl\_easy\_strerror**(3)](/man/os/curl/curl_easy_strerror.3), [**curl\_multi\_strerror**(3)](/man/os/curl/curl_multi_strerror.3), [**curl\_url\_strerror**(3)](/man/os/curl/curl_url_strerror.3), [**libcurl-errors**(3)](/man/os/curl/libcurl-errors.3)

2026-10-31 libcurl

---

Document: curl_share_strerror(3) from curl 8.23.0-r3 (Chainguard OS)
Source: https://github.com/curl/curl.git
