diff src/socket.c @ 3867:43e396e94095

[gaim-migrate @ 4019] compile cleanups by nathan committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Sun, 03 Nov 2002 07:36:09 +0000
parents bb49f0c4f7cd
children fa6395637e2c
line wrap: on
line diff
--- a/src/socket.c	Sun Nov 03 07:32:07 2002 +0000
+++ b/src/socket.c	Sun Nov 03 07:36:09 2002 +0000
@@ -31,6 +31,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/un.h>
+#include <unistd.h>
 #include "gaim.h"
 #include "gaim-socket.h"
 
@@ -102,19 +103,19 @@
 	struct gaim_cui_packet *p = g_new0(struct gaim_cui_packet, 1);
 	char *data = NULL;
 
-	if (!(read(fd, p->type, sizeof(p->type)))) {
+	if (!(read(fd, &p->type, sizeof(p->type)))) {
 		g_free(p);
 		return NULL;
 	}
 	
 	
-	if (!(read(fd, p->subtype, sizeof(p->subtype)))) {
+	if (!(read(fd, &p->subtype, sizeof(p->subtype)))) {
 		g_free(p);
 		return NULL;
 	}
 	
 	
-	if (!(read(fd, p->length, sizeof(p->length)))) {
+	if (!(read(fd, &p->length, sizeof(p->length)))) {
 		g_free(p);
 		return NULL;
 	}
@@ -127,6 +128,7 @@
 		}
 	}
 	p->data = data;
+	return p;
 }
 
 /* copied directly from xmms_connect_to_session */