From 931567654a3ab454c079ed4d14813faccee54201 Mon Sep 17 00:00:00 2001 From: zhangtao2020 <18066722603@163.com> Date: Fri, 30 Jul 2021 10:50:45 +0800 Subject: [PATCH] fix gcc upgrade causes compilation failure --- pax-3.4-gcc10.patch | 32 ++++++++++++++++++++++++++++++++ pax.spec | 6 +++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 pax-3.4-gcc10.patch diff --git a/pax-3.4-gcc10.patch b/pax-3.4-gcc10.patch new file mode 100644 index 0000000..8960e47 --- /dev/null +++ b/pax-3.4-gcc10.patch @@ -0,0 +1,32 @@ +diff -up pax-3.4/src/extern.h.me pax-3.4/src/extern.h +--- pax-3.4/src/extern.h.me 2020-01-31 13:41:27.520585130 +0100 ++++ pax-3.4/src/extern.h 2020-01-31 13:41:46.366376773 +0100 +@@ -185,7 +185,7 @@ void options(int, char **); + OPLIST * opt_next(void); + int opt_add(const char *); + int bad_opt(void); +-char *chdname; ++extern char *chdname; + + /* + * pat_rep.c +diff -up pax-3.4/src/options.c.me pax-3.4/src/options.c +--- pax-3.4/src/options.c.me 2020-01-31 13:43:45.988955243 +0100 ++++ pax-3.4/src/options.c 2020-01-31 14:25:13.558764306 +0100 +@@ -83,6 +83,8 @@ static int my_getline_error; + #define GZIP_CMD "gzip" /* command to run as gzip */ + #define COMPRESS_CMD "compress" /* command to run as compress */ + ++char *chdname; ++ + /* + * Format specific routine table - MUST BE IN SORTED ORDER BY NAME + * (see pax.h for description of each function) +@@ -724,6 +726,7 @@ tar_options (int argc, char **argv) + case 'o': + if (opt_add ("write_opt=nodir") < 0) + tar_usage (); ++ /* FALLTHROUGH */ + case 'O': + Oflag = 1; + break; diff --git a/pax.spec b/pax.spec index fc1bbff..bf02429 100644 --- a/pax.spec +++ b/pax.spec @@ -1,11 +1,12 @@ Name: pax Version: 3.4 -Release: 35 +Release: 36 Summary: POSIX File System Archiver License: BSD URL: http://repository.timesys.com/buildsources/p Source: http://repository.timesys.com/buildsources/p/pax/pax-3.4/pax-3.4.tar.bz2 Patch0000: pax-disable_Werror_option.patch +Patch0001: pax-3.4-gcc10.patch %description Pax is the POSIX standard archive tool. It supports the two most common @@ -39,6 +40,9 @@ Man pages and other related help documents for pax. %doc %{_mandir}/man1/pax.1.gz %changelog +* Fri 30 Jul 2021 zhangtao - 3.4-36 +- fix gcc upgrade causes compilation failure + * Web 02 Jun 2021 zhaoyao - 3.4-35 - fixs faileds: /bin/sh: gcc: command not found.