summaryrefslogtreecommitdiff
path: root/x11/vte/patches/patch-ai
blob: 30eafd0ff266d907284af3d31827c662027a1424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$NetBSD: patch-ai,v 1.4 2013/12/16 19:51:14 asau Exp $

--- gnome-pty-helper/gnome-pty-helper.c.orig	2010-07-15 17:08:44.000000000 +0000
+++ gnome-pty-helper/gnome-pty-helper.c	2013-12-16 19:42:58.699504493 +0000
@@ -51,7 +51,11 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+#if defined(__FreeBSD__)
+#include <utmpx.h>
+#else
 #include <utmp.h>
+#endif
 #include <grp.h>
 #include "gnome-pty.h"
 #include "gnome-login-support.h"
@@ -122,6 +126,7 @@
 	msg.msg_iovlen     = 1;
 	msg.msg_name       = NULL;
 	msg.msg_namelen    = 0;
+#if defined(CMSG_FIRSTHDR)
 	msg.msg_control    = (caddr_t) cmsgbuf;
 	msg.msg_controllen = sizeof(cmsgbuf);
 
@@ -131,6 +136,7 @@
 	cmptr->cmsg_len   = CMSG_LEN(sizeof(int));
         fdptr = (int *) CMSG_DATA(cmptr);
         memcpy (fdptr, &fd, sizeof(int));
+#endif
 	if (sendmsg (client_fd, &msg, 0) != 1)
 		return -1;