summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/nano/files/nano-4.9.3-minimal_build_fix.patch')
-rw-r--r--app-editors/nano/files/nano-4.9.3-minimal_build_fix.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/app-editors/nano/files/nano-4.9.3-minimal_build_fix.patch b/app-editors/nano/files/nano-4.9.3-minimal_build_fix.patch
new file mode 100644
index 000000000000..52112bab7235
--- /dev/null
+++ b/app-editors/nano/files/nano-4.9.3-minimal_build_fix.patch
@@ -0,0 +1,46 @@
+From a98f48b4e82db7d30aa04925fb28344f5bce8c7c Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Mon, 22 Jun 2020 14:00:23 +0200
+Subject: [PATCH] build: fix compilation for --enable-tiny --enable-color
+ --enable-nanorc
+
+Backported to v4.9.3
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ src/nano.c | 2 +-
+ src/text.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/nano.c b/src/nano.c
+index be80a073..3ac81ba4 100644
+--- a/src/nano.c
++++ b/src/nano.c
+@@ -1079,7 +1079,7 @@ RETSIGTYPE do_continue(int signal)
+ ungetch(KEY_FLUSH);
+ }
+
+-#if !defined(NANO_TINY) || defined(ENABLE_SPELLER)
++#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
+ /* Block or unblock the SIGWINCH signal, depending on the blockit parameter. */
+ void block_sigwinch(bool blockit)
+ {
+diff --git a/src/text.c b/src/text.c
+index c7690fd0..32727946 100644
+--- a/src/text.c
++++ b/src/text.c
+@@ -2032,10 +2032,10 @@ bool replace_buffer(const char *filename, undo_type action, const char *operatio
+
+ /* Cut either the marked region or the whole buffer. */
+ add_undo(action, NULL);
+-#endif
+ do_snip(FALSE, openfile->mark, openfile->mark == NULL, FALSE);
+-#ifndef NANO_TINY
+ update_undo(action);
++#else
++ do_snip(FALSE, TRUE, FALSE, FALSE);
+ #endif
+
+ /* Discard what was cut. */
+--
+2.28.0
+