 +	#define FNM_EXTMATCH 0
 +#endif
 +
- #ifndef linux
- #define __BYTE_ORDER BYTE_ORDER
- #define __BIG_ENDIAN BIG_ENDIAN
+ #include "endian_compat.h"
+ #include "squashfs_fs.h"
+ #include "unsquashfs_error.h"
 diff --git a/squashfs-tools/unsquashfs_info.c b/squashfs-tools/unsquashfs_info.c
 index c8e2b9b..7d4f7af 100644
 --- a/squashfs-tools/unsquashfs_info.c
 +++ b/squashfs-tools/unsquashfs_info.c
-@@ -97,31 +97,22 @@ void dump_state()
+@@ -96,31 +96,22 @@ void dump_state()
  void *info_thrd(void *arg)
  {
  	sigset_t sigmask;

+	char *path = strdup(action_data->subpath);
+	int is_match = fnmatch(atom->argv[0], get_start(path,
 		count_components(atom->argv[0])),
 		FNM_PATHNAME|FNM_PERIOD|FNM_EXTMATCH) == 0;
+	free(path);
+	return is_match;
 }

 					"because %s\n", strerror(errno));
 			}
 		}
@@ -132,8 +123,12 @@ void *info_thrd(void *arg)
 			/* set one second interval period, if ^\ received
 			   within then, dump queue and cache status */
 			waiting = 1;
