SHA256
1
0
forked from pool/libisds
Dominique Leuenberger 2020-06-06 21:40:10 +00:00 committed by Git OBS Bridge
commit c286125d47
3 changed files with 61 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jun 5 05:17:39 UTC 2020 - Jiri Slaby <jslaby@suse.com>
- add tests-Fix-building-with-GCC-10.patch
-------------------------------------------------------------------
Thu Nov 28 12:37:33 UTC 2019 - Jiri Slaby <jslaby@suse.com>

View File

@ -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

View File

@ -0,0 +1,54 @@
From: =?utf8?q?Petr=20P=C3=ADsa=C5=99?= <petr.pisar@atlas.cz>
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 <unistd.h>
/* 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