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.
This commit is contained in:
parent
b0cce363f1
commit
fc76b4a258
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user