--- mksquashfs.c.orig	2026-01-01 13:36:11.482332500 -0500
+++ mksquashfs.c	2026-01-01 13:39:48.814986400 -0500
@@ -53,8 +53,10 @@
 #include <sys/sysinfo.h>
 
 #ifndef linux
+#ifndef __CYGWIN__
 #include <sys/sysctl.h>
 #endif
+#endif
 
 #include "squashfs_fs.h"
 #include "squashfs_swap.h"
@@ -5083,14 +5085,19 @@
 		int mib[2];
 		size_t len = sizeof(processors);
 
+#ifdef __CYGWIN__
+		processors = sysconf(_SC_NPROCESSORS_ONLN);
+		if(processors == -1)
+#else
 		mib[0] = CTL_HW;
 #ifdef HW_AVAILCPU
 		mib[1] = HW_AVAILCPU;
 #else
 		mib[1] = HW_NCPU;
 #endif
-
-		if(sysctl(mib, 2, &processors, &len, NULL, 0) == -1) {
+		if(sysctl(mib, 2, &processors, &len, NULL, 0) == -1)
+#endif
+		{
 			ERROR_START("Failed to get number of available "
 				"processors.");
 			ERROR_EXIT("  Defaulting to 1\n");
--- unsquashfs.c.orig	2026-01-01 13:36:14.928682300 -0500
+++ unsquashfs.c	2026-01-01 13:40:31.949122400 -0500
@@ -2718,14 +2718,19 @@
 		int mib[2];
 		size_t len = sizeof(processors);
 
+#ifdef __CYGWIN__
+	processors = sysconf(_SC_NPROCESSORS_ONLN);
+	if(processors == -1)
+#else
 		mib[0] = CTL_HW;
 #ifdef HW_AVAILCPU
 		mib[1] = HW_AVAILCPU;
 #else
 		mib[1] = HW_NCPU;
 #endif
-
-		if(sysctl(mib, 2, &processors, &len, NULL, 0) == -1) {
+		if(sysctl(mib, 2, &processors, &len, NULL, 0) == -1)
+#endif
+		{
 			ERROR("Failed to get number of available processors.  "
 				"Defaulting to 1\n");
 			processors = 1;
