From fc76b4a25872d71341203fd69c7d72524e628ecf Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Mon, 24 Aug 2020 13:24:54 +0200 Subject: [PATCH] Use the cross-platform socket file descriptor type Windows and unix use a diferent data type for representing socket file descriptors (SOCKET vs int). This mismatch results in a compiler warning when comparing to S_INVALID. --- src/irda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/irda.c b/src/irda.c index 448c57c..2cc58ab 100644 --- a/src/irda.c +++ b/src/irda.c @@ -155,7 +155,7 @@ dc_irda_iterator_new (dc_iterator_t **out, dc_context_t *context, dc_descriptor_ } // Open the socket. - int fd = socket (AF_IRDA, SOCK_STREAM, 0); + s_socket_t fd = socket (AF_IRDA, SOCK_STREAM, 0); if (fd == S_INVALID) { s_errcode_t errcode = S_ERRNO; SYSERROR (context, errcode);