summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sockutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sockutil.c b/sockutil.c
index 05aa0bc..4020ed4 100644
--- a/sockutil.c
+++ b/sockutil.c
@@ -106,12 +106,12 @@ recv_packet(int fd)
{
char buf[QARSH_MAX_PACKET_SIZE];
uint32_t packetsize;
- char *psbuf = &packetsize;
+ void *psbuf = &packetsize;
int bufused = 0;
int ret = 0;
do {
- if ((ret = read(fd, psbuf+bufused, sizeof packetsize - bufused)) < 0) {
+ if ((ret = read(fd, (char *)psbuf+bufused, sizeof packetsize - bufused)) < 0) {
fprintf(stderr, "Read error while reading packet size: %s\n", strerror(errno));
return NULL;
} else if (ret == 0) {