From 0f22ad0facb906e589647c004cfac1abb5e4447f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Aug 04 2020 11:27:51 +0000 Subject: fix argument reading for non x86_64 archs - use int instead of char --- diff --git a/pnm2ppa-optargs-read.patch b/pnm2ppa-optargs-read.patch new file mode 100644 index 0000000..a837955 --- /dev/null +++ b/pnm2ppa-optargs-read.patch @@ -0,0 +1,13 @@ +diff --git a/pnm2ppa.c b/pnm2ppa.c +index 4ae36ce..0d60fbb 100644 +--- a/pnm2ppa.c ++++ b/pnm2ppa.c +@@ -604,7 +604,7 @@ main (int argc, char *argv[]) + int i, opt_index; + FILE *in = NULL, *out = NULL, *gf = NULL; + struct stat tmpstat; +- char c; ++ int c; + BOOLEAN get_Gamma = true; + + char *gammaFile=NULL; diff --git a/pnm2ppa.spec b/pnm2ppa.spec index 7e758a4..e53cda4 100644 --- a/pnm2ppa.spec +++ b/pnm2ppa.spec @@ -2,7 +2,7 @@ Name: pnm2ppa Summary: Drivers for printing to HP PPA printers Epoch: 1 Version: 1.04 -Release: 47%{?dist} +Release: 48%{?dist} URL: http://sourceforge.net/projects/pnm2ppa Source: http://download.sourceforge.net/pnm2ppa/pnm2ppa-%{version}.tar.gz # Following sourcelink is dead currently. @@ -17,6 +17,8 @@ Patch4: pnm2ppa-coverity-return-local.patch Patch5: pnm2ppa-ldflags.patch # FTBFS with GCC 10 Patch6: pnm2ppa-gcc10.patch +# fix argument reading for non x86_64 archs - use int instead of char +Patch7: pnm2ppa-optargs-read.patch License: GPLv2+ # gcc is no longer in buildroot by default @@ -43,6 +45,7 @@ Install pnm2ppa if you need to print to a PPA printer. %patch4 -p1 -b .coverity-return-local %patch5 -p1 -b .ldflags %patch6 -p1 -b .gcc10 +%patch7 -p1 -b .optargs-read for file in docs/en/LICENSE pbm2ppa-0.8.6/LICENSE; do sed "s|\r||g" $file > $file.new && \ @@ -99,6 +102,9 @@ done %config(noreplace) %{_sysconfdir}/pbm2ppa.conf %changelog +* Tue Aug 04 2020 Zdenek Dohnal - 1:1.04-48 +- fix argument reading for non x86_64 archs - use int instead of char + * Mon Aug 03 2020 Zdenek Dohnal - 1:1.04-47 - add foomatic as a dependency, because pnm2ppa drivers are not available as a driver without it