32 lines
879 B
Text
32 lines
879 B
Text
$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;
|
|
|