Signed-off-by: Leno Hou <[email protected]>
---
.../files/hfsplusutils-1.0.4-gcc5.patch | 98 ++++++++++++++++++++++
sys-fs/hfsplusutils/hfsplusutils-1.0.4-r1.ebuild | 1 +
2 files changed, 99 insertions(+)
create mode 100644 sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-gcc5.patch
diff --git a/sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-gcc5.patch
b/sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-gcc5.patch
new file mode 100644
index 0000000..3dacd57
--- /dev/null
+++ b/sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-gcc5.patch
@@ -0,0 +1,98 @@
+--- libhfsp/src/blockiter.h.orig 2016-04-15 16:32:04.548299500 +0000
++++ libhfsp/src/blockiter.h 2016-04-15 16:32:24.920515955 +0000
+@@ -52,9 +52,4 @@
+ extern int blockiter_skip(blockiter *b, UInt32 skip);
+
+ /* return current block */
+-extern inline UInt32 blockiter_curr(blockiter *b)
+-{
+- return b->e->start_block + b->block;
+-}
+-
+-
++extern inline UInt32 blockiter_curr(blockiter *b);
+--- libhfsp/src/libhfsp.h.orig 2016-04-15 16:32:45.888738808 +0000
++++ libhfsp/src/libhfsp.h 2016-04-15 16:33:12.809024783 +0000
+@@ -90,15 +90,7 @@
+
+
+ /** helper function to create those Apple 4 byte Signatures */
+-extern inline UInt32 sig(char c0, char c1, char c2, char c3)
+-{
+- UInt32 sig;
+- ((char*)&sig)[0] = c0;
+- ((char*)&sig)[1] = c1;
+- ((char*)&sig)[2] = c2;
+- ((char*)&sig)[3] = c3;
+- return sig;
+-}
++extern inline UInt32 sig(char c0, char c1, char c2, char c3);
+
+
+
+--- libhfsp/src/volume.h.orig 2016-04-15 16:34:29.641839177 +0000
++++ libhfsp/src/volume.h 2016-04-15 16:35:03.154194245 +0000
+@@ -75,12 +75,7 @@
+ extern void volume_create_extents_tree(volume* vol);
+
+ /* accessor for entends btree, is created on demand */
+-extern inline btree* volume_get_extents_tree(volume* vol)
+-{
+- if (!vol->extents)
+- volume_create_extents_tree(vol);
+- return vol->extents;
+-}
++extern inline btree* volume_get_extents_tree(volume* vol);
+
+ /* return new Id for files/folder and check for overflow.
+ *
+--- src/dstring.h.orig 2016-04-15 16:38:14.404216390 +0000
++++ src/dstring.h 2016-04-15 16:38:45.344543346 +0000
+@@ -42,13 +42,6 @@
+ extern void dstring_shrink(dstring *, size_t);
+ extern void dstring_free(dstring *);
+
+-extern inline char *dstring_string(dstring *string)
+-{
+- return string->str;
+-}
+-
+-extern inline int dstring_length(dstring *string)
+-{
+- return string->len;
+-}
++extern inline char *dstring_string(dstring *string);
++extern inline int dstring_length(dstring *string);
+
+--- src/dlist.h.orig 2016-04-15 16:39:16.336870099 +0000
++++ src/dlist.h 2016-04-15 16:39:55.697284793 +0000
+@@ -36,14 +36,5 @@
+ extern int dlist_append(dlist *, const char *);
+
+ /* return the array of strings in a list; can dispose with free() */
+-extern inline char **dlist_array(dlist *list)
+-{
+- return (char **) list->mem;
+-}
+-
+-/* return the number of strings in a list */
+-extern inline int dlist_size(dlist *list)
+-{
+- return list->eltend - (char **) list->mem;
+-}
+-
++extern inline char **dlist_array(dlist *list);
++extern inline int dlist_size(dlist *list);
+--- src/darray.h.orig 2016-04-15 16:43:23.775481365 +0000
++++ src/darray.h 2016-04-15 16:43:41.807671388 +0000
+@@ -40,9 +40,4 @@
+ extern void darray_sort(darray *, int (*)(const void *, const
void *));
+
+ /* return the array as an indexable block */
+-extern inline void *darray_array(darray *array)
+-{
+- return (void *) array->mem;
+-}
+-
+-
++extern inline void *darray_array(darray *array);
diff --git a/sys-fs/hfsplusutils/hfsplusutils-1.0.4-r1.ebuild
b/sys-fs/hfsplusutils/hfsplusutils-1.0.4-r1.ebuild
index aa6fe7c..e673c04 100644
--- a/sys-fs/hfsplusutils/hfsplusutils-1.0.4-r1.ebuild
+++ b/sys-fs/hfsplusutils/hfsplusutils-1.0.4-r1.ebuild
@@ -26,6 +26,7 @@ src_unpack() {
epatch "${FILESDIR}/${P}-errno.patch"
epatch "${FILESDIR}/${P}-gcc4.patch"
epatch "${FILESDIR}/${P}-string.patch"
+ epatch "${FILESDIR}/${P}-gcc5.patch"
#let's avoid the Makefile.cvs since isn't working for us
eautoreconf
}
--
2.1.4