commit:     fce1098ddbdcbbcb84bd34430de4bcad597cd8fc
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 13 18:29:58 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 18:40:40 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fce1098d

sys-fs/squashfs-tools: fix building w/newer glibc

 .../files/squashfs-tools-4.3-sysmacros.patch       | 25 ++++++++++++++++++++++
 sys-fs/squashfs-tools/squashfs-tools-4.3.ebuild    |  4 ++++
 2 files changed, 29 insertions(+)

diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.3-sysmacros.patch 
b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-sysmacros.patch
new file mode 100644
index 0000000..1430b1a
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-sysmacros.patch
@@ -0,0 +1,25 @@
+sys/types.h might not always include sys/sysmacros.h for major/minor/makedev
+
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -59,6 +59,7 @@
+ #else
+ #include <endian.h>
+ #include <sys/sysinfo.h>
++#include <sys/sysmacros.h>
+ #endif
+ 
+ #include "squashfs_fs.h"
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -38,6 +38,10 @@
+ #include <limits.h>
+ #include <ctype.h>
+ 
++#ifdef linux
++#include <sys/sysmacros.h>
++#endif
++
+ struct cache *fragment_cache, *data_cache;
+ struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
+ pthread_t *thread, *inflator_thread;

diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.3.ebuild 
b/sys-fs/squashfs-tools/squashfs-tools-4.3.ebuild
index ae89fac..fb5398a 100644
--- a/sys-fs/squashfs-tools/squashfs-tools-4.3.ebuild
+++ b/sys-fs/squashfs-tools/squashfs-tools-4.3.ebuild
@@ -27,6 +27,10 @@ DEPEND="${RDEPEND}"
 
 S="${WORKDIR}/squashfs${PV}/${PN}"
 
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-sysmacros.patch
+}
+
 use10() { usex $1 1 2 ; }
 
 src_configure() {

Reply via email to