aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2017-05-12 18:40:45 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2017-05-12 20:19:13 +0200
commit2088513214cc6d03bcb303a951d2df14ec6b57b5 (patch)
treebbad97fa090f79b69439dfd923fb22e9145e3b3f /gnu/packages
parent9bd42f1dc371836cc4335250db08ab29bff07ae2 (diff)
downloadguix-2088513214cc6d03bcb303a951d2df14ec6b57b5.tar
guix-2088513214cc6d03bcb303a951d2df14ec6b57b5.tar.gz
gnu: reptry: Fix build.
* 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.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/patches/reptyr-fix-gcc-7.patch38
-rw-r--r--gnu/packages/screen.scm3
2 files changed, 41 insertions, 0 deletions
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 0000000000..5e0e581218
--- /dev/null
+++ b/gnu/packages/patches/reptyr-fix-gcc-7.patch
@@ -0,0 +1,38 @@
+This patch allows reptyr to build with gcc 7. It is taken from reptyr mainline patches
+fa0d63f and b45fd92.
+
+https://github.com/nelhage/reptyr/commit/fa0d63ff8c488be15976e5353580b565e85586a1
+https://github.com/nelhage/reptyr/commit/b45fd9238958fcf2d8f3d6fc23e6d491febea2ac
+
+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 1bdfcd0110..49584662b1 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"))))