aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/gcin-devel
diff options
context:
space:
mode:
authorclive <clive@FreeBSD.org>2005-10-13 11:35:11 +0800
committerclive <clive@FreeBSD.org>2005-10-13 11:35:11 +0800
commitd4701df1e61e8d4ad62241436e1c38d558dc791f (patch)
tree3612eb995386afae10e61ae01fa9f5a0c1e448de /chinese/gcin-devel
parent25c2cbf538f0029a023b3e8240b48a487f42d49b (diff)
downloadfreebsd-ports-gnome-d4701df1e61e8d4ad62241436e1c38d558dc791f.tar.gz
freebsd-ports-gnome-d4701df1e61e8d4ad62241436e1c38d558dc791f.tar.zst
freebsd-ports-gnome-d4701df1e61e8d4ad62241436e1c38d558dc791f.zip
Better code to obtain socket length. No functional change.
Submitted by: vanilla
Diffstat (limited to 'chinese/gcin-devel')
-rw-r--r--chinese/gcin-devel/files/patch-im-client_gcin-im-client.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/chinese/gcin-devel/files/patch-im-client_gcin-im-client.c b/chinese/gcin-devel/files/patch-im-client_gcin-im-client.c
index 89aea7a4c99f..7a0a4d196574 100644
--- a/chinese/gcin-devel/files/patch-im-client_gcin-im-client.c
+++ b/chinese/gcin-devel/files/patch-im-client_gcin-im-client.c
@@ -1,11 +1,14 @@
---- im-client/gcin-im-client.c.orig Wed Oct 5 05:56:02 2005
-+++ im-client/gcin-im-client.c Wed Oct 5 05:56:23 2005
-@@ -94,7 +94,7 @@
+--- im-client/gcin-im-client.c~ Thu Oct 13 01:11:53 2005
++++ im-client/gcin-im-client.c Thu Oct 13 01:14:23 2005
+@@ -94,7 +94,11 @@
get_gcin_im_srv_sock_path(sock_path, sizeof(sock_path));
addr = sock_path;
strcpy(serv_addr.sun_path, sock_path);
-- servlen = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family);
-+ servlen = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family) +1;
++#ifdef SUN_LEN
++ servlen = SUN_LEN(&serv_addr);
++#else
+ servlen = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family);
++#endif
if ((sockfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
perror("cannot open socket");