1 From a0c129760ca9bdc7e564ae2a508fac3799f9d39b Mon Sep 17 00:00:00 2001
2 From: Alexandru Ardelean <aa@ocedo.com>
3 Date: Wed, 6 Jan 2016 15:33:43 +0200
4 Subject: [PATCH 1/2] squashfs-tools: with fnmatch.h compatibility with musl
6 Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
8 squashfs-tools/action.c | 2 +-
9 squashfs-tools/fnmatch_compat.h | 32 ++++++++++++++++++++++++++++++++
10 squashfs-tools/mksquashfs.c | 2 +-
11 squashfs-tools/unsquashfs.c | 1 +
12 squashfs-tools/unsquashfs.h | 1 -
13 5 files changed, 35 insertions(+), 3 deletions(-)
14 create mode 100644 squashfs-tools/fnmatch_compat.h
16 diff --git a/squashfs-tools/action.c b/squashfs-tools/action.c
17 index 35889a4..4b06ccb 100644
18 --- a/squashfs-tools/action.c
19 +++ b/squashfs-tools/action.c
22 #include <sys/types.h>
29 #include "mksquashfs.h"
32 +#include "fnmatch_compat.h"
35 * code to parse actions
36 diff --git a/squashfs-tools/fnmatch_compat.h b/squashfs-tools/fnmatch_compat.h
38 index 0000000..7b4afd8
40 +++ b/squashfs-tools/fnmatch_compat.h
42 +#ifndef FNMATCH_COMPAT
43 +#define FNMATCH_COMPAT
47 + * Copyright (c) 2015
48 + * Phillip Lougher <phillip@squashfs.org.uk>
50 + * This program is free software; you can redistribute it and/or
51 + * modify it under the terms of the GNU General Public License
52 + * as published by the Free Software Foundation; either version 2,
53 + * or (at your option) any later version.
55 + * This program is distributed in the hope that it will be useful,
56 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
57 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58 + * GNU General Public License for more details.
60 + * You should have received a copy of the GNU General Public License
61 + * along with this program; if not, write to the Free Software
62 + * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
70 +#define FNM_EXTMATCH 0
74 diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
75 index d221c35..4e7cbdd 100644
76 --- a/squashfs-tools/mksquashfs.c
77 +++ b/squashfs-tools/mksquashfs.c
89 #include "process_fragments.h"
90 +#include "fnmatch_compat.h"
94 diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
95 index 1323dd6..2428baa 100644
96 --- a/squashfs-tools/unsquashfs.c
97 +++ b/squashfs-tools/unsquashfs.c
100 #include "unsquashfs_info.h"
102 +#include "fnmatch_compat.h"
104 #include <sys/sysinfo.h>
105 #include <sys/types.h>
106 diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
107 index ecd0bb4..0edbd25 100644
108 --- a/squashfs-tools/unsquashfs.h
109 +++ b/squashfs-tools/unsquashfs.h
114 -#include <fnmatch.h>