--- gphoto2-2.5.32/gphoto2/shell.c.orig	2023-06-13 13:09:15.000000000 +0200
+++ gphoto2-2.5.32/gphoto2/shell.c	2025-08-17 12:32:30.399955300 +0200
@@ -31,7 +31,11 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <fnmatch.h>
+#ifndef _WIN32
+# include <fnmatch.h>
+#else
+# include <shlwapi.h>
+#endif
 
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
@@ -769,7 +773,11 @@
 	/* Get all matching files */
 	for (x = 1; x <= gp_list_count (list); x++) {
 		gp_list_get_name (list, x - 1, &name);
-		if (fnmatch (arg, name, (1 << 4)) == 0) {
+#ifdef _WIN32
+		if (PathMatchSpecA(name, arg)) {
+#else
+		if (fnmatch(arg, name, (1 << 4)) == 0) {
+#endif
 			printf ("Getting file %s ... ", name);
 			fflush(stdout);
 			// get file
