aboutsummaryrefslogtreecommitdiff
path: root/sysutils/gnomesystemmonitor/files
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2004-04-05 03:11:39 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2004-04-05 03:11:39 +0000
commitc4851e78e4f63338fe9a4883e5b7a0370dce27f7 (patch)
tree3910aa2e83f782cec94f15b4547dadb741cd29ce /sysutils/gnomesystemmonitor/files
parentf82c84522b047dd99c6f9d85ce3e07217ccce7df (diff)
downloadports-c4851e78e4f63338fe9a4883e5b7a0370dce27f7.tar.gz
ports-c4851e78e4f63338fe9a4883e5b7a0370dce27f7.zip
Notes
Diffstat (limited to 'sysutils/gnomesystemmonitor/files')
-rw-r--r--sysutils/gnomesystemmonitor/files/patch-src_util.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/sysutils/gnomesystemmonitor/files/patch-src_util.c b/sysutils/gnomesystemmonitor/files/patch-src_util.c
index b7e262b0c599..288ccc26adc0 100644
--- a/sysutils/gnomesystemmonitor/files/patch-src_util.c
+++ b/sysutils/gnomesystemmonitor/files/patch-src_util.c
@@ -1,5 +1,5 @@
---- src/util.c.orig Thu May 9 01:16:48 2002
-+++ src/util.c Thu May 9 01:17:13 2002
+--- src/util.c.orig Fri Dec 12 02:26:57 2003
++++ src/util.c Fri Dec 12 02:35:38 2003
@@ -16,6 +16,7 @@
#ifdef __FreeBSD__
@@ -8,3 +8,27 @@
# include <libutil.h>
#endif
+@@ -181,7 +182,11 @@
+ * Make su think we're sending the password from a terminal:
+ */
+
++#ifndef __FreeBSD__
+ if (((t_fd = OPEN_TTY()) < 0) || (grantpt(t_fd) < 0) || (unlockpt(t_fd) < 0)) {
++#else
++ if ((t_fd = OPEN_TTY()) < 0) {
++#endif
+ fprintf (stderr, "Unable to open a terminal\n");
+ ABORT (root);
+ }
+@@ -259,7 +264,11 @@
+ }
+ }
+
++#ifndef __FreeBSD__
+ if(((pts = ptsname(t_fd)) == NULL) || ((t_fd = open(pts, O_RDWR | O_NOCTTY)) < 0)) {
++#else
++ if (((pts = ttyname(t_fd)) == NULL) || ((t_fd = open(pts, O_RDWR | O_NOCTTY)) < 0)) {
++#endif
+ perror ("Unable to open pseudo slave terminal");
+ _exit (-1);
+ }