From 970af59731dbb0098b51f9302ce061b2ad67f25a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 24 Jul 2018 15:36:19 +0200 Subject: [PATCH] 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. --- src/nm-connectivity.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c index d343b5c14..559dfe83e 100644 --- a/src/nm-connectivity.c +++ b/src/nm-connectivity.c @@ -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);