fix gcc upgrade causes compilation failure

This commit is contained in:
zhangtao2020 2021-07-30 14:48:37 +08:00
parent 6a3d41d90d
commit 419928e48c
2 changed files with 19 additions and 1 deletions

13
ykpers-args-extern.patch Normal file
View File

@ -0,0 +1,13 @@
--- ykpers-args.h 2019-02-19 13:29:54.000000000 +0100
+++ ykpers-args.h.patch 2020-02-14 13:27:53.624129087 +0100
@@ -33,8 +33,8 @@
#include "ykpers.h"
-const char *usage;
-const char *optstring;
+extern const char *usage;
+extern const char *optstring;
int args_to_config(int argc, char **argv, YKP_CONFIG *cfg, char *oathid,
size_t oathid_len, const char **infname,

View File

@ -2,11 +2,12 @@
Name: ykpers Name: ykpers
Version: 1.20.0 Version: 1.20.0
Release: 2 Release: 3
Summary: The YubiKey Personalization package contains a library and command line tool used to personalize Summary: The YubiKey Personalization package contains a library and command line tool used to personalize
License: BSD License: BSD
URL: https://developers.yubico.com/yubikey-personalization/ URL: https://developers.yubico.com/yubikey-personalization/
Source0: https://developers.yubico.com/yubikey-personalization/%{name}-%{version}.tar.gz Source0: https://developers.yubico.com/yubikey-personalization/%{name}-%{version}.tar.gz
Patch0: ykpers-args-extern.patch
BuildRequires: libusb-devel gcc libyubikey-devel systemd-udev BuildRequires: libusb-devel gcc libyubikey-devel systemd-udev
@ -21,6 +22,7 @@ The YubiKey Personalization package contains a library and command line tool use
%prep %prep
%setup -q -n %{name}-%{version}/ %setup -q -n %{name}-%{version}/
%patch0 -p0
%build %build
%configure --enable-static=no --with-udevrulesdir=/usr/lib/udev/rules.d %configure --enable-static=no --with-udevrulesdir=/usr/lib/udev/rules.d
@ -53,6 +55,9 @@ rm -rf %{buildroot}/%{_libdir}/*.la
%changelog %changelog
* Fri 30 Jul 2021 zhangtao <zhangtao221@huawei.com> - 1.20.0-3
-fix gcc upgrade causes compilation failure
* Mon May 31 2021 huanghaitao <huanghaitao8@huawei.com> - 1.20.0-2 * Mon May 31 2021 huanghaitao <huanghaitao8@huawei.com> - 1.20.0-2
- Completing build dependencies to define %{_udevrulesdir} macros - Completing build dependencies to define %{_udevrulesdir} macros