Fix link failuer with gcc-10
This commit is contained in:
parent
ce7782b1d2
commit
d4656e1edf
56
partclone-0.3.12-gcc10.patch
Normal file
56
partclone-0.3.12-gcc10.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From 7638e1937083f6da076e5c469c14acc32f65ba49 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robert Scheck <robert@fedoraproject.org>
|
||||||
|
Date: Sun, 2 Feb 2020 23:13:06 +0100
|
||||||
|
Subject: [PATCH] Declare variables as extern in headers (fixes #136)
|
||||||
|
|
||||||
|
GCC 10 compatibility as per https://gcc.gnu.org/gcc-10/porting_to.html
|
||||||
|
|
||||||
|
See also:
|
||||||
|
- https://github.com/Thomas-Tsai/partclone/issues/136
|
||||||
|
- https://github.com/Thomas-Tsai/partclone/pull/137
|
||||||
|
---
|
||||||
|
src/partclone.c | 1 +
|
||||||
|
src/partclone.h | 4 ++--
|
||||||
|
src/xfsclone.c | 2 +-
|
||||||
|
3 files changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/partclone.c b/src/partclone.c
|
||||||
|
index 98365043..e264cbb1 100644
|
||||||
|
--- a/src/partclone.c
|
||||||
|
+++ b/src/partclone.c
|
||||||
|
@@ -55,6 +55,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
FILE* msg = NULL;
|
||||||
|
+unsigned long long rescue_write_size;
|
||||||
|
#ifdef HAVE_LIBNCURSESW
|
||||||
|
#include <ncurses.h>
|
||||||
|
WINDOW *log_win;
|
||||||
|
diff --git a/src/partclone.h b/src/partclone.h
|
||||||
|
index 5188e290..3dc2ef1b 100644
|
||||||
|
--- a/src/partclone.h
|
||||||
|
+++ b/src/partclone.h
|
||||||
|
@@ -80,8 +80,8 @@ const char* get_exec_name();
|
||||||
|
#undef crc32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-char *EXECNAME;
|
||||||
|
-unsigned long long rescue_write_size;
|
||||||
|
+extern char *EXECNAME;
|
||||||
|
+extern unsigned long long rescue_write_size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* option
|
||||||
|
diff --git a/src/xfsclone.c b/src/xfsclone.c
|
||||||
|
index 522431ab..6f807e90 100644
|
||||||
|
--- a/src/xfsclone.c
|
||||||
|
+++ b/src/xfsclone.c
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
#undef crc32
|
||||||
|
int source_fd = -1;
|
||||||
|
int first_residue;
|
||||||
|
-progress_bar prog;
|
||||||
|
+extern progress_bar prog;
|
||||||
|
unsigned long long checked;
|
||||||
|
unsigned long long total_block;
|
||||||
|
int bitmap_done = 0;
|
||||||
@ -4,7 +4,7 @@
|
|||||||
Summary: Utility to clone and restore a partition
|
Summary: Utility to clone and restore a partition
|
||||||
Name: partclone
|
Name: partclone
|
||||||
Version: 0.3.12
|
Version: 0.3.12
|
||||||
Release: 2
|
Release: 3
|
||||||
# Partclone itself is GPLv2+ but uses other source codes, breakdown:
|
# Partclone itself is GPLv2+ but uses other source codes, breakdown:
|
||||||
# GPLv3+: fail-mbr/fail-mbr.S
|
# GPLv3+: fail-mbr/fail-mbr.S
|
||||||
# GPLv2 and GPLv2+: src/btrfs*
|
# GPLv2 and GPLv2+: src/btrfs*
|
||||||
@ -17,6 +17,7 @@ Release: 2
|
|||||||
License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2 and LGPLv2+
|
License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2 and LGPLv2+
|
||||||
URL: http://partclone.org/
|
URL: http://partclone.org/
|
||||||
Source0: https://github.com/Thomas-Tsai/partclone/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/Thomas-Tsai/partclone/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: partclone-0.3.12-gcc10.patch
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: libuuid-devel
|
BuildRequires: libuuid-devel
|
||||||
BuildRequires: fuse-devel
|
BuildRequires: fuse-devel
|
||||||
@ -41,7 +42,7 @@ and is designed for higher compatibility of the file system by using existing
|
|||||||
libraries, e.g. e2fslibs is used to read and write the ext2 partition.
|
libraries, e.g. e2fslibs is used to read and write the ext2 partition.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
autoreconf -i -f
|
autoreconf -i -f
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -66,6 +67,9 @@ autoreconf -i -f
|
|||||||
--enable-minix \
|
--enable-minix \
|
||||||
--enable-ncursesw \
|
--enable-ncursesw \
|
||||||
--enable-fs-test
|
--enable-fs-test
|
||||||
|
# https://forum.slitaz.org/topic/parclone-needs-to-be-rebuilded
|
||||||
|
sed -i 's|exit 1|exit 0|' fail-mbr/compile-mbr.sh
|
||||||
|
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -115,6 +119,9 @@ make check || (cat tests/test-suite.log; exit 1)
|
|||||||
%{_mandir}/man8/%{name}*.8*
|
%{_mandir}/man8/%{name}*.8*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 3 2021 weidong <weidong@uniontech.com> - 0.3.12-3
|
||||||
|
- Fix link failuer with gcc-10
|
||||||
|
|
||||||
* Fri Nov 6 2020 weidong <weidong@uniontech.com> - 0.3.12-2
|
* Fri Nov 6 2020 weidong <weidong@uniontech.com> - 0.3.12-2
|
||||||
- Modify buildrequires
|
- Modify buildrequires
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user