tools/squashfs4: include sysmacros.h explicitly

glibc is moving to remove the include of sys/sysmacros.h from
sys/types.h, and some distros have done this early. Other libcs may
already lack this include. Include sysmacros.h explicitly.

Fixes: FS#1017

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
[refresh patches]
Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
Alex Maclean
2017-10-23 13:48:19 +01:00
committed by Mathias Kresin
parent 09bfca653c
commit 4425fa84da
5 changed files with 36 additions and 16 deletions

View File

@@ -0,0 +1,20 @@
--- a/squashfs-tools/mksquashfs.c
+++ b/squashfs-tools/mksquashfs.c
@@ -33,6 +33,7 @@
#include <stddef.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
--- a/squashfs-tools/unsquashfs.c
+++ b/squashfs-tools/unsquashfs.c
@@ -30,6 +30,7 @@
#include "xattr.h"
#include <sys/types.h>
+#include <sys/sysmacros.h>
struct cache *fragment_cache, *data_cache;
struct queue *to_reader, *to_deflate, *to_writer, *from_writer;