FTBFS with GCC 10

This commit is contained in:
Zdenek Dohnal 2020-02-03 13:53:02 +01:00
parent e44eee4b61
commit 9cfd1ccc55
2 changed files with 39 additions and 1 deletions

33
c2esp-gcc10.patch Normal file
View File

@ -0,0 +1,33 @@
diff --git a/src/c2espcommon.c b/src/c2espcommon.c
index 51291f7..409e7f6 100644
--- a/src/c2espcommon.c
+++ b/src/c2espcommon.c
@@ -43,11 +43,11 @@
* Globals...
*/
char CallerName[50]; /* String that identifies the calling program */
-int DoBack; /* Enables the back channel comms */
+extern int DoBack; /* Enables the back channel comms */
char BackBuf[32000]; //for the back channel replies from the printer
int BackBufLen=sizeof(BackBuf)-1;
FILE *LogFile = NULL; //file descriptor for log file
-time_t StartTime;
+extern time_t StartTime;
int BlackPercent, ColourPercent;
time_t KeepAwake(time_t Start, int Interval, FILE *PrintFile)
diff --git a/src/c2espcommon.h b/src/c2espcommon.h
index b726204..967e9ce 100644
--- a/src/c2espcommon.h
+++ b/src/c2espcommon.h
@@ -35,8 +35,8 @@
/*
* Globals...
*/
-char BackBuf[32000]; //for the back channel replies from the printer
-int ColourPercent, BlackPercent; //to store the detected marker levels
+extern char BackBuf[32000]; //for the back channel replies from the printer
+extern int ColourPercent, BlackPercent; //to store the detected marker levels
time_t KeepAwake(time_t Start, int Interval, FILE *PrintFile);

View File

@ -2,7 +2,7 @@
Name: c2esp
Version: 2.7
Release: 18%{?dist}
Release: 19%{?dist}
Summary: CUPS driver for Kodak AiO printers
License: GPLv2+
@ -10,6 +10,7 @@ URL: http://sourceforge.net/projects/cupsdriverkodak/
Source0: http://downloads.sourceforge.net/cupsdriverkodak/c2esp-%{version_no_dot}.tar.gz
Patch01: c2esp-ftbfs-gcc7.patch
Patch02: c2esp-gcc10.patch
# _cups_serverbin macro
BuildRequires: cups-devel
@ -35,6 +36,7 @@ CUPS filters and drivers for Kodak ESP and Hero all in one printers.
%prep
%setup -q -n c2esp-%{version_no_dot}
%patch01 -p1 -b .ftbfs-gcc7
%patch02 -p1 -b .gcc10
%build
%configure
@ -53,6 +55,9 @@ make -C src/ install DESTDIR=%{buildroot}
%{_datadir}/cups/drv/c2esp
%changelog
* Mon Feb 03 2020 Zdenek Dohnal <zdohnal@redhat.com> - 2.7-19
- FTBFS with GCC 10
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild