fix tests with unsigned char (upstream PR 109)

Resolves: rhbz#1473266
This commit is contained in:
Joe Orton 2017-08-04 08:55:17 +01:00
parent 19be79aa3a
commit 003bc38adc
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,14 @@
https://github.com/libexpat/libexpat/pull/109
--- libexpat-R_2_2_3/expat/tests/runtests.c.fixtests
+++ libexpat-R_2_2_3/expat/tests/runtests.c
@@ -5671,7 +5671,7 @@ static int XMLCALL
prefix_converter(void *UNUSED_P(data), const char *s)
{
/* If the first byte is 0xff, raise an error */
- if (s[0] == -1)
+ if (s[0] == (char)-1)
return -1;
/* Just add the low bits of the first byte to the second */
return (s[1] + (s[0] & 0x7f)) & 0x01ff;

View File

@ -5,6 +5,7 @@ Name: expat
Version: %(echo %{unversion} | sed 's/_/./g')
Release: 1%{?dist}
Source: https://github.com/libexpat/libexpat/archive/R_%{unversion}.tar.gz#/expat-%{version}.tar.gz
Patch0: expat-2.2.3-fixtests.patch
URL: https://libexpat.github.io/
License: MIT
BuildRequires: autoconf, libtool, xmlto
@ -35,6 +36,7 @@ Install it if you need to link statically with expat.
%prep
%setup -q -n libexpat-R_%{unversion}/expat
%patch0 -p2 -b .fixtests
sed -i '
s/docbook2x-man/xmlto man --skip-validation/
/^xmlwf.1: XMLWF/d
@ -76,6 +78,9 @@ make check
%{_libdir}/lib*.a
%changelog
* Fri Aug 4 2017 Joe Orton <jorton@redhat.com> - 2.2.3-2
- fix tests with unsigned char (upstream PR 109)
* Thu Aug 3 2017 Joe Orton <jorton@redhat.com> - 2.2.3-1
- update to 2.2.3 (#1473266)