commit:     f83e8e55fd6d69c9438b7e6115ff51cf97b35050
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 19 15:20:07 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jan 19 15:20:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f83e8e55

app-misc/mc: fix build failure on gcc-10

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 app-misc/mc/files/mc-4.8.23-gcc-10.patch | 79 ++++++++++++++++++++++++++++++++
 app-misc/mc/mc-4.8.23-r2.ebuild          |  3 +-
 2 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/app-misc/mc/files/mc-4.8.23-gcc-10.patch 
b/app-misc/mc/files/mc-4.8.23-gcc-10.patch
new file mode 100644
index 00000000000..b7cc3ee71a9
--- /dev/null
+++ b/app-misc/mc/files/mc-4.8.23-gcc-10.patch
@@ -0,0 +1,79 @@
+From 093571938a6c31706f918b011335b8ab30602336 Mon Sep 17 00:00:00 2001
+From: Andrew Borodin <aboro...@vmail.ru>
+Date: Sat, 23 Nov 2019 17:41:58 +0300
+Subject: [PATCH] Ticket #4035: fix compile failure on OS X 10.9.
+
+Fix duplication of menu_map definition.
+
+Move menu_map definition to lib/widget/menu.c.
+
+Signed-off-by: Andrew Borodin <aboro...@vmail.ru>
+---
+ lib/widget/menu.c      | 2 +-
+ lib/widget/menu.h      | 2 ++
+ src/keybind-defaults.c | 3 +--
+ src/keybind-defaults.h | 1 -
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lib/widget/menu.c b/lib/widget/menu.c
+index b7476b62b..68ae6f6ce 100644
+--- a/lib/widget/menu.c
++++ b/lib/widget/menu.c
+@@ -46,7 +46,7 @@
+ 
+ /*** global variables 
****************************************************************************/
+ 
+-const global_keymap_t *menu_map;
++const global_keymap_t *menu_map = NULL;
+ 
+ /*** file scope macro definitions 
****************************************************************/
+ 
+diff --git a/lib/widget/menu.h b/lib/widget/menu.h
+index c522a16c8..fad6fa639 100644
+--- a/lib/widget/menu.h
++++ b/lib/widget/menu.h
+@@ -39,6 +39,8 @@ typedef struct WMenuBar
+ 
+ /*** global variables defined in .c file 
*********************************************************/
+ 
++extern const global_keymap_t *menu_map;
++
+ /*** declarations of public functions 
************************************************************/
+ 
+ menu_entry_t *menu_entry_create (const char *name, long command);
+diff --git a/src/keybind-defaults.c b/src/keybind-defaults.c
+index 10ba341ee..0ba4840df 100644
+--- a/src/keybind-defaults.c
++++ b/src/keybind-defaults.c
+@@ -28,7 +28,7 @@
+ #include <config.h>
+ 
+ #include "lib/global.h"
+-#include "lib/widget.h"         /* dialog_map, input_map, listbox_map */
++#include "lib/widget.h"         /* dialog_map, input_map, listbox_map, 
menu_map */
+ 
+ #include "keybind-defaults.h"
+ 
+@@ -56,7 +56,6 @@ GArray *diff_keymap = NULL;
+ const global_keymap_t *main_map = NULL;
+ const global_keymap_t *main_x_map = NULL;
+ const global_keymap_t *panel_map = NULL;
+-const global_keymap_t *menu_map = NULL;
+ const global_keymap_t *tree_map = NULL;
+ const global_keymap_t *help_map = NULL;
+ 
+diff --git a/src/keybind-defaults.h b/src/keybind-defaults.h
+index edb05c67f..6b7266589 100644
+--- a/src/keybind-defaults.h
++++ b/src/keybind-defaults.h
+@@ -35,7 +35,6 @@ extern GArray *diff_keymap;
+ extern const global_keymap_t *main_map;
+ extern const global_keymap_t *main_x_map;
+ extern const global_keymap_t *panel_map;
+-extern const global_keymap_t *menu_map;
+ extern const global_keymap_t *tree_map;
+ extern const global_keymap_t *help_map;
+ 
+-- 
+2.25.0
+

diff --git a/app-misc/mc/mc-4.8.23-r2.ebuild b/app-misc/mc/mc-4.8.23-r2.ebuild
index 856331ef9aa..64112aaf67b 100644
--- a/app-misc/mc/mc-4.8.23-r2.ebuild
+++ b/app-misc/mc/mc-4.8.23-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -48,6 +48,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-4.8.23-gettext.patch
        "${FILESDIR}"/${PN}-4.8.23-gettext-test.patch
        "${FILESDIR}"/${PN}-4.8.23-vfs-gc-SEGV.patch
+       "${FILESDIR}"/${PN}-4.8.23-gcc-10.patch
 )
 
 pkg_pretend() {

Reply via email to