From c996f894019c5b8e87d0bdb4e971f219cec5d7e9 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Sun, 27 Sep 2020 19:57:35 +0800 Subject: [PATCH] remove 2 compatible point definition in parseopt.c this change has given better compatible with both gcc8 and gcc10 toolchain, should be maintained util upstream fixes backport patch from fc32 until upstream fixes Signed-off-by: Liwei Ge Signed-off-by: weitao zhou --- gdbm-gcc10.patch | 17 +++++++++++++++++ gdbm.spec | 9 ++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 gdbm-gcc10.patch diff --git a/gdbm-gcc10.patch b/gdbm-gcc10.patch new file mode 100644 index 0000000..518482c --- /dev/null +++ b/gdbm-gcc10.patch @@ -0,0 +1,17 @@ +Author:Filip Januš +Date: 7.2.2020 +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1799391 +After upgrade gcc to version gcc version 10.0.1 20200130 (Red Hat 10.0.1-0.7) (GCC) is not possible to build GDBM + +diff -ur gdbm-1.18.1/src/parseopt.c gdbm-1.18.1_new/src/parseopt.c +--- gdbm-1.18.1/src/parseopt.c 2018-05-30 11:39:15.000000000 +0200 ++++ gdbm-1.18.1_new/src/parseopt.c 2020-02-07 20:36:37.226390871 +0100 +@@ -255,8 +255,6 @@ + } + + char *parseopt_program_name; +-char *parseopt_program_doc; +-char *parseopt_program_args; + const char *program_bug_address = "<" PACKAGE_BUGREPORT ">"; + void (*parseopt_help_hook) (FILE *stream); + diff --git a/gdbm.spec b/gdbm.spec index 04936e4..ef1daf6 100644 --- a/gdbm.spec +++ b/gdbm.spec @@ -1,9 +1,10 @@ +%define anolis_release .0.1 %bcond_with largefile Summary: A GNU set of database routines which use extensible hashing Name: gdbm Version: 1.18 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} Epoch: 1 License: GPLv3+ URL: http://www.gnu.org/software/gdbm/ @@ -18,6 +19,8 @@ Source: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz #Patch1: gdbm-1.10-fedora.patch Patch2: gdbm-1.17-coverity-fixes.patch +# backport patch from fc32 +Patch3: gdbm-gcc10.patch BuildRequires: gcc BuildRequires: libtool @@ -59,6 +62,7 @@ gdbm database library. You'll also need to install the gdbm package. %prep %setup -q %patch2 -p1 +%patch3 -p1 %build %configure \ @@ -125,6 +129,9 @@ fi %{_mandir}/man3/* %changelog +* Tue Nov 23 2021 Weitao Zhou - 1:1.18-1.0.1 +- remove char *parseopt_program_doc and *parseopt_program_args in parseopt.c for compatible gcc10 build + * Mon Sep 03 2018 mskalick@redhat.com - 1:1.18-1 - Rebase to latest release 1.18 - Fix issues found by coverity -- Gitee