summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-07-24 15:36:19 +0200
committerThomas Haller <thaller@redhat.com>2018-07-24 15:39:12 +0200
commit970af59731dbb0098b51f9302ce061b2ad67f25a (patch)
tree560d9993d840b9b651d964a0e2988a877134f62e
parentcd0bd8a2eeee42ffbbe32cf83b306f6e8ebb1d82 (diff)
downloadNetworkManager-970af59731dbb0098b51f9302ce061b2ad67f25a.tar.gz
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.
-rw-r--r--src/nm-connectivity.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c
index d343b5c143..559dfe83e7 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);