--- vte-0.11.12.orig/gnome-pty-helper/gnome-pty-helper.c	Sat May  1 02:12:51 2004
+++ vte-0.11.12/gnome-pty-helper/gnome-pty-helper.c	Thu Aug  4 18:36:01 2005
@@ -42,6 +42,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <signal.h>
+#include <sys/param.h>
 #include <fcntl.h>
 #include <termios.h>
 #include <errno.h>
@@ -93,13 +94,13 @@
 #endif
 #endif /* CMSG_DATA */
 
-#define CONTROLLEN (sizeof (struct cmsghdr)  + sizeof (int))
-
 static struct cmsghdr *cmptr;
+static int CONTROLLEN;
 
 static int
 init_msg_pass ()
 {
+	CONTROLLEN = (CMSG_DATA (cmptr) - (unsigned char *)cmptr) + sizeof(int);
 	cmptr = malloc (CONTROLLEN);
 
 	if (cmptr)
