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

This commit is contained in:
Mike Frysinger
2016-04-13 14:40:40 -04:00
parent ab7c08d070
commit fce1098ddb
2 changed files with 29 additions and 0 deletions
@@ -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;
@@ -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() {