Added upstream patch to declare usb_ctx as static (#1799344)

This commit is contained in:
Robert Scheck 2020-02-11 02:25:57 +01:00
parent d9d476a886
commit ff6713a0fe
2 changed files with 34 additions and 1 deletions

28
flashrom-1.1-gcc10.patch Normal file
View File

@ -0,0 +1,28 @@
Parts of https://github.com/flashrom/flashrom/commit/afc3ad64300bbcc14266e645beec897ef06df13d
diff --git a/dediprog.c b/dediprog.c
index 8029b64f4..5af1eec66 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -43,7 +43,7 @@
#define REQTYPE_OTHER_IN (LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_OTHER) /* 0xC3 */
#define REQTYPE_EP_OUT (LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_ENDPOINT) /* 0x42 */
#define REQTYPE_EP_IN (LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_ENDPOINT) /* 0xC2 */
-struct libusb_context *usb_ctx;
+static struct libusb_context *usb_ctx;
static libusb_device_handle *dediprog_handle;
static int dediprog_in_endpoint;
static int dediprog_out_endpoint;
diff --git a/developerbox_spi.c b/developerbox_spi.c
index c80a79449..4ff2fb609 100644
--- a/developerbox_spi.c
+++ b/developerbox_spi.c
@@ -60,7 +60,7 @@ const struct dev_entry devs_developerbox_spi[] = {
{0},
};
-struct libusb_context *usb_ctx;
+static struct libusb_context *usb_ctx;
static libusb_device_handle *cp210x_handle;
static int cp210x_gpio_get(void)

View File

@ -1,12 +1,13 @@
Name: flashrom
Version: 1.1
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Simple program for reading/writing flash chips content
License: GPLv2
URL: https://flashrom.org
Source0: https://download.flashrom.org/releases/%{name}-v%{version}.tar.bz2
# https://github.com/flashrom/flashrom/commit/0b59b0dafc219ba73ee2af5404ce626575d74c6f
Patch0: flashrom-1.1-gcc10.patch
BuildRequires: gcc
BuildRequires: pciutils-devel
@ -34,6 +35,7 @@ other programmer devices.
%prep
%setup -q -n %{name}-v%{version}
%patch0 -p1 -b .gcc10
# Replace GROUP="plugdev" specifiers with TAG+="uaccess"
sed -e 's/MODE="[0-9]*", GROUP="plugdev"/TAG+="uaccess"/g' util/z60_flashrom.rules -i
@ -64,6 +66,9 @@ install -D -p -m 0644 util/z60_flashrom.rules %{buildroot}/%{_udevrulesdir}/60_f
%changelog
* Tue Feb 11 2020 Robert Scheck <robert@fedoraproject.org> - 1.1-4
- Added upstream patch to declare usb_ctx as static (#1799344)
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild