From 23734b97f0bf430917283ee2075eb2f4b6170e17cb1878a74668edcfd5b9422f Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dmueller@suse.com>
Date: Thu, 2 Aug 2018 07:06:39 +0000
Subject: [PATCH] Accepting request 626934 from
 home:Andreas_Schwab:glibc:rebuild

- sysmacros.patch: Include <sys/sysmacros.h> for major/minor/makedev

OBS-URL: https://build.opensuse.org/request/show/626934
OBS-URL: https://build.opensuse.org/package/show/filesystems/squashfs?expand=0&rev=32
---
 squashfs.changes |  5 +++++
 squashfs.spec    |  7 +++++--
 sysmacros.patch  | 24 ++++++++++++++++++++++++
 3 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 sysmacros.patch

diff --git a/squashfs.changes b/squashfs.changes
index 6a180c8..c4236ba 100644
--- a/squashfs.changes
+++ b/squashfs.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Wed Aug  1 14:36:31 UTC 2018 - schwab@suse.de
+
+- sysmacros.patch: Include <sys/sysmacros.h> for major/minor/makedev
+
 -------------------------------------------------------------------
 Thu Jun 16 15:18:06 UTC 2016 - duwe@suse.com
 
diff --git a/squashfs.spec b/squashfs.spec
index de7bedc..acfcc1e 100644
--- a/squashfs.spec
+++ b/squashfs.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package squashfs
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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
@@ -20,7 +20,7 @@ Name:           squashfs
 Version:        4.3
 Release:        0
 Summary:        A Read-Only File System with Efficient Compression
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          System/Filesystems
 Url:            http://squashfs.sourceforge.net/
 Source0:        http://sourceforge.net/projects/squashfs/files/squashfs/%{name}%{version}/%{name}%{version}.tar.gz
@@ -30,6 +30,8 @@ Patch1:         0001-mksquashfs-fix-rare-race-in-fragment-waiting-in-file.patch
 # PATCH-FIX-UPSTREAM 0002-Fix-2GB-limit-of-the-is_fragment-.-function.patch boo#953723
 Patch2:         0002-Fix-2GB-limit-of-the-is_fragment-.-function.patch
 Patch3:         squashfs-thread-limit
+# PATCH-FIX-UPSTREAM Include <sys/sysmacros.h> for major/minor/makedev
+Patch4:         sysmacros.patch
 %if %{?suse_version} > 1315
 BuildRequires:  liblz4-devel
 %endif
@@ -49,6 +51,7 @@ squashfs images.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 sed -i -e "s,-O2,%{optflags}," squashfs-tools/Makefile
diff --git a/sysmacros.patch b/sysmacros.patch
new file mode 100644
index 0000000..53c1376
--- /dev/null
+++ b/sysmacros.patch
@@ -0,0 +1,24 @@
+Index: squashfs4.3/squashfs-tools/mksquashfs.c
+===================================================================
+--- squashfs4.3.orig/squashfs-tools/mksquashfs.c
++++ squashfs4.3/squashfs-tools/mksquashfs.c
+@@ -43,6 +43,7 @@
+ #include <signal.h>
+ #include <setjmp.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <sys/mman.h>
+ #include <pthread.h>
+ #include <regex.h>
+Index: squashfs4.3/squashfs-tools/unsquashfs.c
+===================================================================
+--- squashfs4.3.orig/squashfs-tools/unsquashfs.c
++++ squashfs4.3/squashfs-tools/unsquashfs.c
+@@ -33,6 +33,7 @@
+ 
+ #include <sys/sysinfo.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+ #include <limits.h>