diff options
Diffstat (limited to 'gdb/ser-tcp.c')
-rw-r--r-- | gdb/ser-tcp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index e4fbf26..75c8b76 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -338,7 +338,10 @@ net_close (struct serial *scb) int net_read_prim (struct serial *scb, size_t count) { - return recv (scb->fd, scb->buf, count, 0); + /* Need to cast to silence -Wpointer-sign on MinGW, as Winsock's + 'recv' takes 'char *' as second argument, while 'scb->buf' is + 'unsigned char *'. */ + return recv (scb->fd, (void *) scb->buf, count, 0); } int |