Package: ncurses-hexedit
Version: 0.9.7+orig-7
Followup-For: Bug #957585
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu hirsute ubuntu-patch
Control: tags -1 patch

Hi,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/p/gcc_10.patch: Fix FTBFS with GCC 10.

Thanks for considering the patch.

Logan
diff -Nru ncurses-hexedit-0.9.7+orig/debian/patches/gcc_10.patch 
ncurses-hexedit-0.9.7+orig/debian/patches/gcc_10.patch
--- ncurses-hexedit-0.9.7+orig/debian/patches/gcc_10.patch      1969-12-31 
19:00:00.000000000 -0500
+++ ncurses-hexedit-0.9.7+orig/debian/patches/gcc_10.patch      2021-01-15 
23:13:37.000000000 -0500
@@ -0,0 +1,44 @@
+--- a/src/hexedit.h
++++ b/src/hexedit.h
+@@ -343,7 +343,7 @@
+ 
+ 
+    /* Global structure, keep most global variables here. */
+-struct
++struct Globals_t
+ {
+    WINDOW *wmain, *wstatus, *whelp; /* three windows used throughout. */
+    unsigned long filesize;          /* size of the file buffer. */
+@@ -365,7 +365,9 @@
+                                     /* buf end. */
+    int beeping;                     /* Allow beeping or not. */
+    int help_msg_count;              /* Number of messages in help menu. */
+-} Globals;
++};
++
++extern struct Globals_t Globals;
+ 
+ 
+ struct foundit
+@@ -400,7 +402,9 @@
+    int s;
+    struct Change *base;
+    struct Change *top;
+-} UndoStack;
++};
++
++extern struct ChangeLog UndoStack;
+ 
+ 
+ struct FileNames
+--- a/src/init.c
++++ b/src/init.c
+@@ -35,6 +35,8 @@
+ 
+ extern char **environ;
+ 
++struct ChangeLog UndoStack;
++struct Globals_t Globals;
+ 
+    /* This is called once at the start of the program.  Handles HEXEDIT
+     * Environment variable, command line arguments, sets up signal
diff -Nru ncurses-hexedit-0.9.7+orig/debian/patches/series 
ncurses-hexedit-0.9.7+orig/debian/patches/series
--- ncurses-hexedit-0.9.7+orig/debian/patches/series    2019-01-30 
22:29:46.000000000 -0500
+++ ncurses-hexedit-0.9.7+orig/debian/patches/series    2021-01-15 
23:11:19.000000000 -0500
@@ -16,3 +16,4 @@
 enforce_readonly_mode.patch
 fix_buffer_overruns.patch
 fix_spelling_errors.patch
+gcc_10.patch

Reply via email to