[packages/flashrom] - fix build on x32, rel 2

baggins baggins at pld-linux.org
Fri Apr 7 20:04:52 CEST 2023


commit 054405d2aca74663e4dcdfb5c8c151e48ad1e0c4
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Apr 7 20:04:29 2023 +0200

    - fix build on x32, rel 2

 flashrom.spec |  4 +++-
 x32.patch     | 14 ++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/flashrom.spec b/flashrom.spec
index 9de6ef6..88df5ce 100644
--- a/flashrom.spec
+++ b/flashrom.spec
@@ -8,11 +8,12 @@ Summary:	Tool Flashing your BIOS from the Unix/Linux command line
 Summary(pl.UTF-8):	Narzędzie do aktualizacji BIOS-u z linii poleceń Uniksa/Linuksa
 Name:		flashrom
 Version:	1.3.0
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		Applications/System
 Source0:	https://download.flashrom.org/releases/%{name}-v%{version}.tar.bz2
 # Source0-md5:	dd2727f8fa05a4517689ca4f9d87e600
+Patch0:		x32.patch
 URL:		https://www.flashrom.org/Flashrom
 %{?with_apidocs:BuildRequires:	doxygen}
 %{?with_ftdi:BuildRequires:	libftdi1-devel >= 1.0}
@@ -137,6 +138,7 @@ Dokumentacja API biblioteki libflashrom.
 
 %prep
 %setup -q -n %{name}-v%{version}
+%patch0 -p1
 
 %build
 %meson build \
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..e318467
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,14 @@
+--- flashrom-v1.3.0/udelay.c~	2019-06-23 23:39:48.000000000 +0200
++++ flashrom-v1.3.0/udelay.c	2023-04-07 19:58:35.239152653 +0200
+@@ -57,7 +57,11 @@
+ 	struct timespec res;
+ 	if (!clock_getres(clock_id, &res)) {
+ 		if (res.tv_sec == 0 && res.tv_nsec <= 100) {
++#if defined(__x86_64__) && defined(__ILP32__)
++			msg_pinfo("Using clock_gettime for delay loops (clk_id: %d, resolution: %lldns).\n",
++#else
+ 			msg_pinfo("Using clock_gettime for delay loops (clk_id: %d, resolution: %ldns).\n",
++#endif
+ 				  (int)clock_id, res.tv_nsec);
+ 			use_clock_gettime = true;
+ 			return 1;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/flashrom.git/commitdiff/054405d2aca74663e4dcdfb5c8c151e48ad1e0c4



More information about the pld-cvs-commit mailing list