plug-ins: fix signedness warning with different expectation Win/Linux.

On Windows, accept() wants an int for addrlen but on Linux, it wants a
socklen_t which is an unsigned int. So we can't just switch to gint as
proposed in !232 (if we do so, the signedness warning now happens on the
Linux build instead of the Windows one).

Fortunately it looks like socklen_t is actually typedef-ed to int in
Windows headers. So let's just use this type, which is much more proper
anyway as this variable is only used in functions which want this type
on Linux.

Fixes:

> warning: pointer targets in passing argument 3 of 'accept' differ in signedness
This commit is contained in:
Jehan
2020-04-17 14:13:26 +02:00
parent e1a11504cd
commit e854de73ee

View File

@ -350,7 +350,7 @@ script_fu_server_listen (gint timeout)
gchar clientname[NI_MAXHOST];
/* Connection request on original socket. */
guint size = sizeof (client);
socklen_t size = sizeof (client);
gint new;
guint portno;