From 419928e48c1d7d083f3e8273b0fbcceb54ff4abf Mon Sep 17 00:00:00 2001 From: zhangtao2020 <18066722603@163.com> Date: Fri, 30 Jul 2021 14:48:37 +0800 Subject: [PATCH] fix gcc upgrade causes compilation failure --- ykpers-args-extern.patch | 13 +++++++++++++ ykpers.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ykpers-args-extern.patch diff --git a/ykpers-args-extern.patch b/ykpers-args-extern.patch new file mode 100644 index 0000000..975546f --- /dev/null +++ b/ykpers-args-extern.patch @@ -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, diff --git a/ykpers.spec b/ykpers.spec index fd4dda4..6425445 100644 --- a/ykpers.spec +++ b/ykpers.spec @@ -2,11 +2,12 @@ Name: ykpers Version: 1.20.0 -Release: 2 +Release: 3 Summary: The YubiKey Personalization package contains a library and command line tool used to personalize License: BSD URL: https://developers.yubico.com/yubikey-personalization/ Source0: https://developers.yubico.com/yubikey-personalization/%{name}-%{version}.tar.gz +Patch0: ykpers-args-extern.patch 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 %setup -q -n %{name}-%{version}/ +%patch0 -p0 %build %configure --enable-static=no --with-udevrulesdir=/usr/lib/udev/rules.d @@ -53,6 +55,9 @@ rm -rf %{buildroot}/%{_libdir}/*.la %changelog +* Fri 30 Jul 2021 zhangtao - 1.20.0-3 +-fix gcc upgrade causes compilation failure + * Mon May 31 2021 huanghaitao - 1.20.0-2 - Completing build dependencies to define %{_udevrulesdir} macros