[packages/lessfs] - fix building with gcc 10+, rebuild with openssl 3.0.0, rel 2

baggins baggins at pld-linux.org
Sun Oct 17 21:19:32 CEST 2021


commit 6144fe0b87c9f88326f83ac315cc509ba06c344f
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Oct 17 21:19:01 2021 +0200

    - fix building with gcc 10+, rebuild with openssl 3.0.0, rel 2

 gcc10.patch | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lessfs.spec |  4 +++-
 2 files changed, 65 insertions(+), 1 deletion(-)
---
diff --git a/lessfs.spec b/lessfs.spec
index b90278f..2269411 100644
--- a/lessfs.spec
+++ b/lessfs.spec
@@ -2,12 +2,13 @@ Summary:	Lessfs is an inline data deduplicating filesystem
 Summary(pl.UTF-8):	Lessfs is an inline data deduplicating filesystem.
 Name:		lessfs
 Version:	1.7.0
-Release:	1
+Release:	2
 License:	GPL v3
 Group:		Applications
 Source0:	http://downloads.sourceforge.net/lessfs/%{name}-%{version}.tar.gz
 # Source0-md5:	8afdb925dba24a58b74fff74d7f3180e
 Patch0:		openssl.patch
+Patch1:		gcc10.patch
 URL:		http://www.lessfs.com/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -30,6 +31,7 @@ Lessfs is an inline data deduplicating filesystem.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
diff --git a/gcc10.patch b/gcc10.patch
new file mode 100644
index 0000000..47ac099
--- /dev/null
+++ b/gcc10.patch
@@ -0,0 +1,62 @@
+diff -u lessfs-1.7.0/lib_cfg.c lessfs-1.7.0-gcc10/lib_cfg.c
+--- lessfs-1.7.0/lib_cfg.c	2011-09-30 20:13:08.000000000 +0200
++++ lessfs-1.7.0-gcc10/lib_cfg.c	2021-10-17 21:12:40.750623419 +0200
+@@ -34,6 +34,8 @@
+ #include "lib_str.h"
+ #include "retcodes.h"
+ 
++struct configdata *config;
++
+ int r_env_cfg(char *configfile)
+ {
+     FILE *config;
+diff -u lessfs-1.7.0/lib_cfg.h lessfs-1.7.0-gcc10/lib_cfg.h
+--- lessfs-1.7.0/lib_cfg.h	2012-04-21 18:09:54.000000000 +0200
++++ lessfs-1.7.0-gcc10/lib_cfg.h	2021-10-17 21:12:31.999872984 +0200
+@@ -88,7 +88,7 @@
+ // Counter is increase by normal ops, decreased by truncation.
+ // (background) Truncation will therefore become slower when other tasks are running.
+ };
+-struct configdata *config;
++extern struct configdata *config;
+ 
+ int read_s_cfg(char *cfgfile, char *value, int size);
+ int read_m_cfg(char *cfgfile, char *value, char *value2, int size);
+diff -u lessfs-1.7.0/lib_tc.c lessfs-1.7.0-gcc10/lib_tc.c
+--- lessfs-1.7.0/lib_tc.c	2013-11-16 05:09:05.000000000 +0100
++++ lessfs-1.7.0-gcc10/lib_tc.c	2021-10-17 21:15:33.016360983 +0200
+@@ -74,14 +74,14 @@
+ extern int max_threads;
+ extern char *passwd;
+ 
+-TCHDB *dbb;
+-TCHDB *dbu;
+-TCHDB *dbp;
+-TCBDB *dbl;
+-TCHDB *dbs;
+-TCHDB *dbdta;
+-TCBDB *dbdirent;
+-TCBDB *freelist;
++extern TCHDB *dbb;
++extern TCHDB *dbu;
++extern TCHDB *dbp;
++extern TCBDB *dbl;
++extern TCHDB *dbs;
++extern TCHDB *dbdta;
++extern TCBDB *dbdirent;
++extern TCBDB *freelist;
+ 
+ extern TCTREE *workqtree;       // Used to buffer incoming data (writes) 
+ extern TCTREE *readcachetree;   // Used to cache chunks of data that are likely to be read
+@@ -96,9 +96,9 @@
+ extern unsigned long long nextoffset;
+ int written = 0;
+ 
+-const char *offset_lockedby;
++extern const char *offset_lockedby;
+ 
+-u_int32_t db_flags, env_flags;
++extern u_int32_t db_flags, env_flags;
+ 
+ int btree_test_transaction(TCBDB * bdb)
+ {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lessfs.git/commitdiff/6144fe0b87c9f88326f83ac315cc509ba06c344f



More information about the pld-cvs-commit mailing list