Skip to content

Commit

Permalink
squashfs-tools: with fnmatch.h compatibility with musl
Browse files Browse the repository at this point in the history
musl does not define FNM_EXTMATCH

Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
  • Loading branch information
Alexandru Ardelean committed Jan 6, 2016
1 parent 9c1db6d commit 4280e74
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion squashfs-tools/action.c
Expand Up @@ -31,7 +31,6 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <fnmatch.h>
#include <pwd.h>
#include <grp.h>
#include <sys/wait.h>
Expand All @@ -43,6 +42,7 @@
#include "mksquashfs.h"
#include "action.h"
#include "error.h"
#include "fnmatch_compat.h"

/*
* code to parse actions
Expand Down
32 changes: 32 additions & 0 deletions squashfs-tools/fnmatch_compat.h
@@ -0,0 +1,32 @@
#ifndef FNMATCH_COMPAT
#define FNMATCH_COMPAT
/*
* Squashfs
*
* Copyright (c) 2015
* Phillip Lougher <phillip@squashfs.org.uk>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* fnmatch_compat.h
*/

#include <fnmatch.h>

#ifndef FNM_EXTMATCH
#define FNM_EXTMATCH 0
#endif

#endif
2 changes: 1 addition & 1 deletion squashfs-tools/mksquashfs.c
Expand Up @@ -46,7 +46,6 @@
#include <sys/mman.h>
#include <pthread.h>
#include <regex.h>
#include <fnmatch.h>
#include <sys/wait.h>
#include <limits.h>
#include <ctype.h>
Expand Down Expand Up @@ -76,6 +75,7 @@
#include "read_fs.h"
#include "restore.h"
#include "process_fragments.h"
#include "fnmatch_compat.h"

int delete = FALSE;
int fd;
Expand Down
1 change: 1 addition & 0 deletions squashfs-tools/unsquashfs.c
Expand Up @@ -30,6 +30,7 @@
#include "xattr.h"
#include "unsquashfs_info.h"
#include "stdarg.h"
#include "fnmatch_compat.h"

#include <sys/sysinfo.h>
#include <sys/types.h>
Expand Down
1 change: 0 additions & 1 deletion squashfs-tools/unsquashfs.h
Expand Up @@ -40,7 +40,6 @@
#include <grp.h>
#include <time.h>
#include <regex.h>
#include <fnmatch.h>
#include <signal.h>
#include <pthread.h>
#include <math.h>
Expand Down

0 comments on commit 4280e74

Please sign in to comment.