squashfs-tools: Define FNM_EXTMATCH if not defined

helps compiling when using musl

(From OE-Core rev: 860db06bb437c936eb5743f75c865bb70fc3ef92)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj 2015-11-18 23:25:24 +00:00 committed by Richard Purdie
parent 36a709aa0f
commit 1b90d675ae
2 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,63 @@
Define FNM_EXTMATCH if not defined its glibc specific define
include missing sys/stat.h for stat* function declarations
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: squashfs-tools/action.c
===================================================================
--- squashfs-tools.orig/action.c
+++ squashfs-tools/action.c
@@ -44,6 +44,10 @@
#include "action.h"
#include "error.h"
+#if !defined(FNM_EXTMATCH)
+#define FNM_EXTMATCH 0
+#endif
+
/*
* code to parse actions
*/
Index: squashfs-tools/mksquashfs.c
===================================================================
--- squashfs-tools.orig/mksquashfs.c
+++ squashfs-tools/mksquashfs.c
@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st
dir_size + 3, directory_block, directory_offset, NULL, NULL,
dir, 0);
+#if !defined(FNM_EXTMATCH)
+#define FNM_EXTMATCH 0
+#endif
+
#ifdef SQUASHFS_TRACE
{
unsigned char *dirp;
Index: squashfs-tools/pseudo.c
===================================================================
--- squashfs-tools.orig/pseudo.c
+++ squashfs-tools/pseudo.c
@@ -32,6 +32,7 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <sys/stat.h>
#include <ctype.h>
#include "pseudo.h"
Index: squashfs-tools/unsquashfs.c
===================================================================
--- squashfs-tools.orig/unsquashfs.c
+++ squashfs-tools/unsquashfs.c
@@ -38,6 +38,10 @@
#include <limits.h>
#include <ctype.h>
+#ifndef FNM_EXTMATCH
+#define FNM_EXTMATCH 0
+#endif
+
struct cache *fragment_cache, *data_cache;
struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
pthread_t *thread, *inflator_thread;

View File

@ -13,6 +13,7 @@ SRCREV = "9c1db6d13a51a2e009f0027ef336ce03624eac0d"
SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \
http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2;name=lzma \
file://0001-mksquashfs.c-get-inline-functions-work-with-C99.patch;striplevel=2 \
file://fix-compat.patch \
"
SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"