From c07ebe8f0ff3eca5df83ccbddcbfe9a37c1289dc Mon Sep 17 00:00:00 2001 From: jasper Date: Mon, 8 Apr 2013 07:57:03 +0000 Subject: [PATCH] rework patch a bit based on feedback from upstream --- x11/gnome/terminal/Makefile | 4 ++-- .../patches/patch-src_terminal-screen_c | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/x11/gnome/terminal/Makefile b/x11/gnome/terminal/Makefile index 941c0a6103d..7e094a5ce40 100644 --- a/x11/gnome/terminal/Makefile +++ b/x11/gnome/terminal/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.96 2013/04/06 09:45:12 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.97 2013/04/08 07:57:03 jasper Exp $ SHARED_ONLY= Yes @@ -6,7 +6,7 @@ COMMENT= GNOME terminal GNOME_PROJECT= gnome-terminal GNOME_VERSION= 3.8.0 -REVISION= 5 +REVISION= 6 # GPLv3+ PERMIT_PACKAGE_CDROM= Yes diff --git a/x11/gnome/terminal/patches/patch-src_terminal-screen_c b/x11/gnome/terminal/patches/patch-src_terminal-screen_c index 70a708d6c35..3ecaddf191d 100644 --- a/x11/gnome/terminal/patches/patch-src_terminal-screen_c +++ b/x11/gnome/terminal/patches/patch-src_terminal-screen_c @@ -1,20 +1,25 @@ -$OpenBSD: patch-src_terminal-screen_c,v 1.6 2013/04/01 09:18:52 jasper Exp $ +$OpenBSD: patch-src_terminal-screen_c,v 1.7 2013/04/08 07:57:03 jasper Exp $ -From 628162f198ffb60dd5c8c30c152af9761f9568b2 Mon Sep 17 00:00:00 2001 +From a8c7f7928f0415d9efc79074d52b534bd253360d Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse -Date: Mon, 1 Apr 2013 11:13:05 +0200 -Subject: Use dup2() (POSIX) instead of dup3() (GLIBC) as the former suffices. +Date: Mon, 8 Apr 2013 09:50:38 +0200 +Subject: [PATCH] Only use dup3 on linux as it's a GLIBC extension. https://bugzilla.gnome.org/show_bug.cgi?id=697024 --- src/terminal-screen.c.orig Wed Mar 20 11:09:31 2013 -+++ src/terminal-screen.c Fri Mar 29 18:22:25 2013 -@@ -1347,7 +1347,7 @@ terminal_screen_child_setup (FDSetupData *data) ++++ src/terminal-screen.c Mon Apr 8 09:44:32 2013 +@@ -1347,7 +1347,13 @@ terminal_screen_child_setup (FDSetupData *data) /* Now we know that target_fd can be safely overwritten. */ errno = 0; do { -- fd = dup3 (fds[idx], target_fd, 0 /* no FD_CLOEXEC */); -+ fd = dup2 (fds[idx], target_fd /* no FD_CLOEXEC */); ++#ifdef __linux + fd = dup3 (fds[idx], target_fd, 0 /* no FD_CLOEXEC */); ++#else ++ fd = fcntl(fds[idx], F_DUPFD, target_fd); ++ if (fd & FD_CLOEXEC) ++ _exit (127); ++#endif } while (fd == -1 && errno == EINTR); if (fd != target_fd) _exit (127);