diff --git a/libisds.changes b/libisds.changes index 3026a0c..130dc9f 100644 --- a/libisds.changes +++ b/libisds.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 5 05:17:39 UTC 2020 - Jiri Slaby + +- add tests-Fix-building-with-GCC-10.patch + ------------------------------------------------------------------- Thu Nov 28 12:37:33 UTC 2019 - Jiri Slaby diff --git a/libisds.spec b/libisds.spec index 3fc3116..70a4875 100644 --- a/libisds.spec +++ b/libisds.spec @@ -1,7 +1,7 @@ # # spec file for package libisds # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,6 +27,7 @@ URL: http://xpisar.wz.cz/libisds/ Source0: http://xpisar.wz.cz/%{name}/dist/%{name}-%{version}.tar.xz Source1: http://xpisar.wz.cz/%{name}/dist/%{name}-%{version}.tar.xz.asc Source2: %{name}.keyring +Patch0: tests-Fix-building-with-GCC-10.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: gpg2 BuildRequires: libgcrypt-devel diff --git a/tests-Fix-building-with-GCC-10.patch b/tests-Fix-building-with-GCC-10.patch new file mode 100644 index 0000000..9f2b1e9 --- /dev/null +++ b/tests-Fix-building-with-GCC-10.patch @@ -0,0 +1,54 @@ +From: =?utf8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 22 Jan 2020 19:13:50 +0100 +Subject: [PATCH 1/1] tests: Fix building with GCC 10 +Git-commit: ce92ec266ccccc90b7a8cb0264b997dab27c10f9 +Patch-mainline: yes + +GCC 10 defaults to -fno-common resulting into errors about a multiple +definitions of variables that where defined instead of declared by +a mistake in a header file that is included into more compilations +units. +--- + test/test.c | 3 +++ + test/test.h | 9 +++++---- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/test/test.c b/test/test.c +index 00e2ddb..6abd774 100644 +--- a/test/test.c ++++ b/test/test.c +@@ -17,8 +17,11 @@ + #include + + /* Global variables for each test unit */ ++char *unit_name = NULL; + char *reason = NULL; ++unsigned int passed, failed, skipped; + void (*test_destructor_function)(void *) = NULL; ++void *test_destructor_argument = NULL; + + /* Print formated string into automtically reallocated @uffer. + * @buffer automatically reallocated buffer. Must be &NULL or preallocated +diff --git a/test/test.h b/test/test.h +index 63f22f9..1559a9d 100644 +--- a/test/test.h ++++ b/test/test.h +@@ -14,10 +14,11 @@ + + #include "test-tools.h" + +-char *unit_name, *reason; +-unsigned int passed, failed, skipped; +-void (*test_destructor_function)(void *); +-void *test_destructor_argument; ++extern char *unit_name; ++extern char *reason; ++extern unsigned int passed, failed, skipped; ++extern void (*test_destructor_function)(void *); ++extern void *test_destructor_argument; + + #define INIT_TEST(name) { \ + setlocale(LC_ALL, "C"); \ +-- +2.11.4.GIT +