1 --- a/squashfs-tools/global.h
2 +++ b/squashfs-tools/global.h
3 @@ -44,6 +44,11 @@ typedef long long squashfs_fragment_inde
4 typedef squashfs_inode_t squashfs_inode;
5 typedef squashfs_block_t squashfs_block;
8 +#include <sys/termios.h>
9 +#define FNM_EXTMATCH (1 << 5)
13 #define FNM_EXTMATCH 0
15 --- a/squashfs-tools/mksquashfs.c
16 +++ b/squashfs-tools/mksquashfs.c
22 #define __BYTE_ORDER BYTE_ORDER
23 #define __BIG_ENDIAN BIG_ENDIAN
24 #define __LITTLE_ENDIAN LITTLE_ENDIAN
25 #include <sys/sysctl.h>
26 +#endif /* __CYGWIN__ */
29 #include <sys/sysinfo.h>
30 @@ -817,6 +819,7 @@ void sigusr1_handler()
32 void sigwinch_handler()
35 struct winsize winsize;
37 if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
38 @@ -826,6 +829,9 @@ void sigwinch_handler()
41 columns = winsize.ws_col;
48 @@ -3853,7 +3859,9 @@ void initialise_threads()
49 BAD_ERROR("Failed to set signal mask in intialise_threads\n");
51 signal(SIGUSR1, sigusr1_handler);
54 + processors = atoi(getenv("NUMBER_OF_PROCESSORS"));
56 if(processors == -1) {
59 @@ -3875,6 +3883,7 @@ void initialise_threads()
60 processors = get_nprocs();
63 +#endif /* __CYGWIN__ */
65 if((thread = malloc((2 + processors * 2) * sizeof(pthread_t))) == NULL)
66 BAD_ERROR("Out of memory allocating thread descriptors\n");
67 --- a/squashfs-tools/read_fs.c
68 +++ b/squashfs-tools/read_fs.c
69 @@ -39,9 +39,11 @@ extern unsigned int get_guid(unsigned in
74 #define __BYTE_ORDER BYTE_ORDER
75 #define __BIG_ENDIAN BIG_ENDIAN
76 #define __LITTLE_ENDIAN LITTLE_ENDIAN
81 --- a/squashfs-tools/swap.c
82 +++ b/squashfs-tools/swap.c
88 #define __BYTE_ORDER BYTE_ORDER
89 #define __BIG_ENDIAN BIG_ENDIAN
90 #define __LITTLE_ENDIAN LITTLE_ENDIAN
95 --- a/squashfs-tools/unsquashfs.c
96 +++ b/squashfs-tools/unsquashfs.c
97 @@ -112,6 +112,7 @@ void update_progress_bar();
99 void sigwinch_handler()
102 struct winsize winsize;
104 if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
105 @@ -121,6 +122,9 @@ void sigwinch_handler()
108 columns = winsize.ws_col;
115 @@ -1787,7 +1791,9 @@ void initialise_threads(int fragment_buf
116 if(sigprocmask(SIG_BLOCK, &sigmask, &old_mask) == -1)
117 EXIT_UNSQUASH("Failed to set signal mask in intialise_threads"
121 + processors = atoi(getenv("NUMBER_OF_PROCESSORS"));
123 if(processors == -1) {
126 @@ -1809,6 +1815,7 @@ void initialise_threads(int fragment_buf
127 processors = get_nprocs();
130 +#endif /* __CYGWIN__ */
132 if((thread = malloc((3 + processors) * sizeof(pthread_t))) == NULL)
133 EXIT_UNSQUASH("Out of memory allocating thread descriptors\n");
134 --- a/squashfs-tools/unsquashfs.h
135 +++ b/squashfs-tools/unsquashfs.h
137 #include <sys/time.h>
141 #define __BYTE_ORDER BYTE_ORDER
142 #define __BIG_ENDIAN BIG_ENDIAN
143 #define __LITTLE_ENDIAN LITTLE_ENDIAN
144 #include <sys/sysctl.h>
145 +#endif /* __CYGWIN__ */
148 #include <sys/sysinfo.h>