connectivity: add compile time check that "curl_socket_t" is a typedef to plain "int"

On non-Windows, libcurl's "curl_socket_t" type is just a typedef for
int. We rely on that, because we use it as file descriptor.

Add a compile time check to ensure that.
This commit is contained in:
Thomas Haller
2018-07-24 15:36:19 +02:00
parent cd0bd8a2ee
commit 970af59731

View File

@@ -343,6 +343,8 @@ multi_socket_cb (CURL *e_handle, curl_socket_t fd, int what, void *userdata, voi
ConCurlSockData *fdp = socketp;
GIOCondition condition = 0;
(void) _NM_ENSURE_TYPE (int, fd);
if (what == CURL_POLL_REMOVE) {
if (fdp) {
curl_multi_assign (priv->concheck.curl_mhandle, fd, NULL);