From 9d4166d6736e66111ee3bae8db4b74eda8584dd338b0385830473ea1dc4df0c7 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 17 Dec 2016 13:02:28 +0000 Subject: [PATCH] Accepting request 445449 from home:marxin:branches:Base:System Fix package to support GCC 7. OBS-URL: https://build.opensuse.org/request/show/445449 OBS-URL: https://build.opensuse.org/package/show/Base:System/dd_rescue?expand=0&rev=29 --- dd_rescue.changes | 5 +++++ dd_rescue.spec | 6 +++++- gcc7-static-inline.patch | 26 ++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 gcc7-static-inline.patch diff --git a/dd_rescue.changes b/dd_rescue.changes index 8def9ce..c72151e 100644 --- a/dd_rescue.changes +++ b/dd_rescue.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 9 11:56:45 UTC 2016 - mliska@suse.cz + +- Add gcc7-static-inline.patch. + ------------------------------------------------------------------- Sun Jun 7 10:20:47 CEST 2015 - kurt@garloff.de diff --git a/dd_rescue.spec b/dd_rescue.spec index 314757b..330df10 100644 --- a/dd_rescue.spec +++ b/dd_rescue.spec @@ -1,7 +1,7 @@ # # spec file for package dd_rescue # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,6 +27,9 @@ Source0: http://garloff.de/kurt/linux/ddrescue/%{name}-%{version}.tar.bz2 Source1: http://garloff.de/kurt/linux/ddrescue/%{name}-%{version}.tar.bz2.asc Source2: %{name}.keyring Source99: %{name}.changes + +# PATCH-FIX-OPENSUSE gcc7-static-inline.patch - Add 'static' to inlined fns +Patch1: gcc7-static-inline.patch BuildRequires: autoconf BuildRequires: libattr-devel BuildRequires: lzo-devel @@ -115,6 +118,7 @@ data to the decompressor; the plugin is still young and might expose bugs. %prep %setup -q +%patch1 ./autogen.sh # Remove build time references so build-compare can do its work diff --git a/gcc7-static-inline.patch b/gcc7-static-inline.patch new file mode 100644 index 0000000..62877d3 --- /dev/null +++ b/gcc7-static-inline.patch @@ -0,0 +1,26 @@ +--- /tmp/dd_rescue.c 2016-12-09 12:49:49.868777805 +0100 ++++ dd_rescue.c 2016-12-09 12:49:57.680925114 +0100 +@@ -315,12 +315,12 @@ + } + #endif + +-inline char* fmt_kiB(loff_t no, char col) ++static inline char* fmt_kiB(loff_t no, char col) + { + return fmt_int(0, 1, 1024, no, (col? BOLD: ""), (col? NORM: ""), 1); + } + +-inline float difftimetv(const struct timeval* const t2, ++static inline float difftimetv(const struct timeval* const t2, + const struct timeval* const t1) + { + return (float) (t2->tv_sec - t1->tv_sec ) + +@@ -724,7 +724,7 @@ + } + + /** Calc position in graph */ +-inline int gpos(loff_t off, loff_t len) ++static inline int gpos(loff_t off, loff_t len) + { + static const int glen = 40; //strlen(graph) - 2; + return 1+(glen*off/len);