diff --git a/tar-1.26-stdio.in.patch b/tar-1.26-stdio.in.patch new file mode 100644 index 0000000..c7a9ca1 --- /dev/null +++ b/tar-1.26-stdio.in.patch @@ -0,0 +1,13 @@ +diff -urNp tar-1.26-orig/gnu/stdio.in.h tar-1.26/gnu/stdio.in.h +--- tar-1.26-orig/gnu/stdio.in.h ++++ tar-1.26/gnu/stdio.in.h +@@ -139,7 +139,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ + #undef gets ++#if HAVE_RAW_DECL_GETS + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ++#endif + + #if @GNULIB_FOPEN@ + # if @REPLACE_FOPEN@ diff --git a/tar.changes b/tar.changes index 8ba7ce4..effc324 100644 --- a/tar.changes +++ b/tar.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 17 08:05:33 UTC 2012 - aj@suse.de + +- Fix build failure with undefined gets (glibc 2.16). + ------------------------------------------------------------------- Wed May 30 13:08:28 UTC 2012 - sweet_f_a@gmx.de diff --git a/tar.spec b/tar.spec index f69fda9..125a5ab 100644 --- a/tar.spec +++ b/tar.spec @@ -31,6 +31,7 @@ Source0: %{name}-%{version}.tar.bz2 Patch3: tar-wildcards.patch Patch6: tar-backup-spec-fix-paths.patch Patch7: tar-1.26-remove_O_NONBLOCK.patch +Patch8: tar-1.26-stdio.in.patch %if 0%{?suse_version} >= %min_suse_ver BuildRequires: help2man Recommends: tar-lang = %{version} @@ -64,6 +65,7 @@ Shell scripts for system backup/restore %patch3 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %build %define my_cflags -W -Wall -Wpointer-arith -Wstrict-prototypes -Wformat-security -Wno-unused-parameter