Fix tests on big-endian

This commit is contained in:
Jakub Hrozek 2014-06-02 11:08:39 +02:00
parent c9a7a9b259
commit 6307570cd8
2 changed files with 34 additions and 2 deletions

View File

@ -0,0 +1,27 @@
From 86f9acd3579c36fe4b198b8ec63b364620eee6e2 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Mon, 2 Jun 2014 10:59:46 +0200
Subject: [PATCH] TESTS: fgetc returns int, not char
We used "char c = fgetc()" where we should have used "int c = fgetc()"
This bug caused errors on big-endian architectures.
---
src/tests/sss_config-tests.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tests/sss_config-tests.c b/src/tests/sss_config-tests.c
index 18ce8d8bf8e8abc2afea2350a0d4e8274f4ffc77..1b2608978affbc7cc1a253b9863fd691117757a4 100644
--- a/src/tests/sss_config-tests.c
+++ b/src/tests/sss_config-tests.c
@@ -261,7 +261,7 @@ check_file_content(const char *filename, const char *expected)
{
FILE *file = NULL;
size_t i;
- char c;
+ int c;
bool result;
file = fopen(filename, "r");
--
1.9.0

View File

@ -14,7 +14,7 @@
Name: sssd Name: sssd
Version: 1.12.0 Version: 1.12.0
Release: 1%{?dist}.beta1 Release: 2%{?dist}.beta1
Group: Applications/System Group: Applications/System
Summary: System Security Services Daemon Summary: System Security Services Daemon
License: GPLv3+ License: GPLv3+
@ -23,6 +23,7 @@ Source0: https://fedorahosted.org/released/sssd/%{name}-%{version}beta1.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
### Patches ### ### Patches ###
Patch0001: 0001-TESTS-fgetc-returns-int-not-char.patch
### Dependencies ### ### Dependencies ###
Requires: sssd-common = %{version}-%{release} Requires: sssd-common = %{version}-%{release}
@ -798,7 +799,11 @@ fi
%postun -n libsss_idmap -p /sbin/ldconfig %postun -n libsss_idmap -p /sbin/ldconfig
%changelog %changelog
* Fri May 30 2014 Jakub Hrozek <jhrozek@redhat.com> - 1.10.0-1.alpha1 * Mon Jun 02 2014 Jakub Hrozek <jhrozek@redhat.com> - 1.10.0-2.beta1
- Fix tests on big-endian
- Fix previous changelog entry
* Fri May 30 2014 Jakub Hrozek <jhrozek@redhat.com> - 1.10.0-1.beta1
- New upstream release 1.12 beta1 - New upstream release 1.12 beta1
- https://fedorahosted.org/sssd/wiki/Releases/Notes-1.12.0beta1 - https://fedorahosted.org/sssd/wiki/Releases/Notes-1.12.0beta1