From: Mathieu Othacehe <m.othacehe@gmail.com>
To: 26898@debbugs.gnu.org
Subject: bug#26898: [PATCH] gnu: reptry: Fix build.
Date: Fri, 12 May 2017 19:33:28 +0200 [thread overview]
Message-ID: <20170512173328.24467-1-m.othacehe@gmail.com> (raw)
* gnu/packages/patches/reptyr-fix-gcc-7.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add new patch.
* gnu/packages/screen.scm (reptyr): Use patch.
---
gnu/local.mk | 1 +
gnu/packages/patches/reptyr-fix-gcc-7.patch | 35 +++++++++++++++++++++++++++++
gnu/packages/screen.scm | 3 +++
3 files changed, 39 insertions(+)
create mode 100644 gnu/packages/patches/reptyr-fix-gcc-7.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 1a3e2f3f0..d7f23966e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -938,6 +938,7 @@ dist_patch_DATA = \
%D%/packages/patches/readline-link-ncurses.patch \
%D%/packages/patches/readline-6.2-CVE-2014-2524.patch \
%D%/packages/patches/readline-7.0-mingw.patch \
+ %D%/packages/patches/reptyr-fix-gcc-7.patch \
%D%/packages/patches/ripperx-missing-file.patch \
%D%/packages/patches/rpcbind-CVE-2017-8779.patch \
%D%/packages/patches/rpm-CVE-2014-8118.patch \
diff --git a/gnu/packages/patches/reptyr-fix-gcc-7.patch b/gnu/packages/patches/reptyr-fix-gcc-7.patch
new file mode 100644
index 000000000..9a2ce006c
--- /dev/null
+++ b/gnu/packages/patches/reptyr-fix-gcc-7.patch
@@ -0,0 +1,35 @@
+This patch allows reptyr to build with gcc 7. It is taken from reptyr mainline patches
+fa0d63f and b45fd92.
+
+Patch by Nelson Elhage <nelhage@nelhage.com>.
+
+diff --git a/attach.c b/attach.c
+index bd8ef8c..8d9cbf8 100644
+--- a/attach.c
++++ b/attach.c
+@@ -389,8 +389,11 @@ int setup_steal_socket(struct steal_pty_state *steal) {
+ return errno;
+
+ steal->addr_un.sun_family = AF_UNIX;
+- snprintf(steal->addr_un.sun_path, sizeof(steal->addr_un.sun_path),
+- "%s/reptyr.sock", steal->tmpdir);
++ if (snprintf(steal->addr_un.sun_path, sizeof(steal->addr_un.sun_path),
++ "%s/reptyr.sock", steal->tmpdir) >= sizeof(steal->addr_un.sun_path)) {
++ error("tmpdir path too long!");
++ return ENAMETOOLONG;
++ }
+
+ if ((steal->sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0)
+ return errno;
+diff --git a/platform/linux/linux.h b/platform/linux/linux.h
+index 9e6b78a..3ec5a99 100644
+--- a/platform/linux/linux.h
++++ b/platform/linux/linux.h
+@@ -40,6 +40,7 @@
+ #include <sys/ptrace.h>
+ #include <asm/ptrace.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <sys/user.h>
+ #include <unistd.h>
+ #include <stdlib.h>
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index 1bdfcd011..49584662b 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -155,6 +156,8 @@ window manager as well as the Tmux terminal multiplexer.")
(method url-fetch)
(uri (string-append "https://github.com/nelhage/reptyr/archive"
"/reptyr-" version ".tar.gz"))
+ ;; XXX: To be removed on next reptyr release.
+ (patches (search-patches "reptyr-fix-gcc-7.patch"))
(sha256
(base32
"07pfl0rkgm8m3f3jy8r9l2yvnhf8lgllpsk3mh57mhzdxq8fagf7"))))
--
2.13.0
next reply other threads:[~2017-05-12 17:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 17:33 Mathieu Othacehe [this message]
2017-05-12 17:55 ` bug#26898: [PATCH] gnu: reptry: Fix build Marius Bakke
2017-05-12 18:21 ` Mathieu Othacehe
2017-05-12 19:09 ` Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170512173328.24467-1-m.othacehe@gmail.com \
--to=m.othacehe@gmail.com \
--cc=26898@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.