bugfix of gcc 10

This commit is contained in:
tushenmei 2021-08-04 12:00:07 +08:00
parent d549475dca
commit 681c0182c3
2 changed files with 30 additions and 1 deletions

24
bugfix-of-gcc10.patch Normal file
View File

@ -0,0 +1,24 @@
diff -Nur umockdev-0.11.3/Makefile.am umockdev-0.11.3-new/Makefile.am
--- umockdev-0.11.3/Makefile.am 2018-05-01 19:01:00.000000000 +0800
+++ umockdev-0.11.3-new/Makefile.am 2021-08-04 11:42:00.000000000 +0800
@@ -261,6 +261,8 @@
tests_test_ioctl_tree_SOURCES = \
src/ioctl_tree.c \
tests/test-ioctl-tree.c \
+ src/debug.h \
+ src/debug.c \
$(NULL)
tests_test_ioctl_tree_CFLAGS = \
diff -Nur umockdev-0.11.3/src/debug.h umockdev-0.11.3-new/src/debug.h
--- umockdev-0.11.3/src/debug.h 2018-05-01 19:01:00.000000000 +0800
+++ umockdev-0.11.3-new/src/debug.h 2021-08-04 11:42:53.000000000 +0800
@@ -13,7 +13,7 @@
#define DBG_IOCTL (1 << 3)
#define DBG_IOCTL_TREE (1 << 4)
-unsigned debug_categories;
+extern unsigned debug_categories;
void init_debug(void) __attribute__((constructor));

View File

@ -1,12 +1,14 @@
Name: umockdev
Version: 0.11.3
Release: 4
Release: 5
Summary: Mock hardware devices
License: LGPLv2+
URL: https://github.com/martinpitt/%{name}
Source0: https://github.com/martinpitt/%{name}/archive/%{version}.tar.gz
Patch0000: fix-glibc-update-error.patch
Patch0001: bugfix-of-gcc10.patch
BuildRequires: autoconf automake libtool gtk-doc gobject-introspection-devel glib2-devel
BuildRequires: libgudev1-devel systemd-devel vala chrpath python3 gphoto2
@ -61,6 +63,9 @@ rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/umockdev
%{_datadir}/vala/vapi/umockdev-1.0.vapi
%changelog
* Wed Aug 4 2021 wutao <tushenmei@huawei.com> - 0.11.3-5
- bugfix-of-gcc10.patch
* Sat Jun 26 2021 wutao <wutao61@huawei.com> - 0.11.3-4
- fix build error due to glibc update