From 0fca57be37ff44f7b32d1018d081d297be989e3a Mon Sep 17 00:00:00 2001 From: Graham Inggs Date: Fri, 3 Jul 2020 10:13:18 +0200 Subject: Avoid FTBFS with GCC 10 --- debian/changelog | 1 + debian/patches/gcc10.patch | 35 +++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 37 insertions(+) create mode 100644 debian/patches/gcc10.patch diff --git a/debian/changelog b/debian/changelog index 17023f6..228ed26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ htop (2.2.0-3) UNRELEASED; urgency=medium [ Graham Inggs ] * Switch to debhelper 13 + * Avoid FTBFS with GCC 10 (Closes: #957344) [ Debian Janitor ] * Set upstream metadata fields: Bug-Database, Repository, Repository- diff --git a/debian/patches/gcc10.patch b/debian/patches/gcc10.patch new file mode 100644 index 0000000..5487ffb --- /dev/null +++ b/debian/patches/gcc10.patch @@ -0,0 +1,35 @@ +Description: Avoid FTBFS with GCC 10 + Initialize some pointers in CRT.c so that CRT.h is + generated with the appropriate 'extern' keywords +Bug: https://github.com/hishamhm/htop/issues/986 +Bug-Debian: https://bugs.debian.org/957344 +Author: Graham Inggs +Last-Update: 2020-07-02 + +--- a/CRT.c ++++ b/CRT.c +@@ -171,7 +171,7 @@ + + int CRT_delay = 0; + +-int* CRT_colors; ++int* CRT_colors = NULL; + + int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = { + [COLORSCHEME_DEFAULT] = { +@@ -537,13 +537,13 @@ + + int CRT_scrollWheelVAmount = 10; + +-char* CRT_termType; ++char* CRT_termType = NULL; + + // TODO move color scheme to Settings, perhaps? + + int CRT_colorScheme = 0; + +-void *backtraceArray[128]; ++void *backtraceArray[128] = { NULL }; + + static void CRT_handleSIGTERM(int sgn) { + (void) sgn; diff --git a/debian/patches/series b/debian/patches/series index 0e63084..6bbf748 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 780-fix-option-string.patch fix-linux-process.patch python3.patch +gcc10.patch -- cgit v1.2.3