[packages/libzbc] - added no-common patch (fixes build with -fno-common, i.e. gcc 10 default)

qboosh qboosh at pld-linux.org
Sat May 30 21:48:59 CEST 2020


commit af2772bdadc669ece85c6e90782d89bfef1aa0be
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat May 30 21:49:42 2020 +0200

    - added no-common patch (fixes build with -fno-common, i.e. gcc 10 default)

 libzbc-no-common.patch | 38 ++++++++++++++++++++++++++++++++++++++
 libzbc.spec            |  2 ++
 2 files changed, 40 insertions(+)
---
diff --git a/libzbc.spec b/libzbc.spec
index 4cce124..788d276 100644
--- a/libzbc.spec
+++ b/libzbc.spec
@@ -15,6 +15,7 @@ Group:		Libraries
 Source0:	https://github.com/hgst/libzbc/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	f2be03832fface56f94dc4bc625bb46c
 Patch0:		%{name}-format.patch
+Patch1:		%{name}-no-common.patch
 URL:		https://github.com/hgst/libzbc
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake >= 1:1.11
@@ -88,6 +89,7 @@ Narzędzia dla libzbc z graficznym interfejsem użytkownika.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
diff --git a/libzbc-no-common.patch b/libzbc-no-common.patch
new file mode 100644
index 0000000..e78f057
--- /dev/null
+++ b/libzbc-no-common.patch
@@ -0,0 +1,38 @@
+--- libzbc-5.8.5/lib/zbc.h.orig	2020-03-09 06:44:41.000000000 +0100
++++ libzbc-5.8.5/lib/zbc.h	2020-05-30 21:29:06.973574281 +0200
+@@ -177,22 +177,22 @@
+ /**
+  * Block device driver (requires kernel support).
+  */
+-struct zbc_drv zbc_block_drv;
++extern struct zbc_drv zbc_block_drv;
+ 
+ /**
+  * ZAC (ATA) device driver (uses SG_IO).
+  */
+-struct zbc_drv zbc_ata_drv;
++extern struct zbc_drv zbc_ata_drv;
+ 
+ /**
+  * ZBC (SCSI) device driver (uses SG_IO).
+  */
+-struct zbc_drv zbc_scsi_drv;
++extern struct zbc_drv zbc_scsi_drv;
+ 
+ /**
+  * ZBC emulation driver (file or block device).
+  */
+-struct zbc_drv zbc_fake_drv;
++extern struct zbc_drv zbc_fake_drv;
+ 
+ #define container_of(ptr, type, member) \
+     ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
+@@ -266,7 +266,7 @@
+ /**
+  * Library log level.
+  */
+-int zbc_log_level;
++extern int zbc_log_level;
+ 
+ #define zbc_print(stream,format,args...)		\
+ 	do {						\
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libzbc.git/commitdiff/af2772bdadc669ece85c6e90782d89bfef1aa0be



More information about the pld-cvs-commit mailing list