summaryrefslogtreecommitdiffstats
path: root/x11-toolkits/vte/files/patch-gnome-pty-helper_gnome-pty-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11-toolkits/vte/files/patch-gnome-pty-helper_gnome-pty-helper.c')
-rw-r--r--x11-toolkits/vte/files/patch-gnome-pty-helper_gnome-pty-helper.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/x11-toolkits/vte/files/patch-gnome-pty-helper_gnome-pty-helper.c b/x11-toolkits/vte/files/patch-gnome-pty-helper_gnome-pty-helper.c
new file mode 100644
index 000000000..6be543a31
--- /dev/null
+++ b/x11-toolkits/vte/files/patch-gnome-pty-helper_gnome-pty-helper.c
@@ -0,0 +1,26 @@
+--- gnome-pty-helper/gnome-pty-helper.c.orig Tue Feb 14 03:58:10 2006
++++ gnome-pty-helper/gnome-pty-helper.c Sat Feb 25 16:38:04 2006
+@@ -95,12 +95,12 @@ static pty_info *pty_list;
+ #endif /* CMSG_DATA */
+
+ static struct cmsghdr *cmptr;
+-static int CONTROLLEN;
++static socklen_t CONTROLLEN;
+
+ static int
+ init_msg_pass (void)
+ {
+- CONTROLLEN = (CMSG_DATA (cmptr) - (unsigned char *)cmptr) + sizeof(int);
++ CONTROLLEN = CMSG_SPACE (sizeof (int));
+ cmptr = malloc (CONTROLLEN);
+
+ if (cmptr)
+@@ -128,7 +128,7 @@ pass_fd (int client_fd, int fd)
+
+ cmptr->cmsg_level = SOL_SOCKET;
+ cmptr->cmsg_type = SCM_RIGHTS;
+- cmptr->cmsg_len = CONTROLLEN;
++ cmptr->cmsg_len = CMSG_LEN (sizeof (fd));
+ *(int *)CMSG_DATA (cmptr) = fd;
+
+ if (sendmsg (client_fd, &msg, 0) != 1)