File gdb-12.1-fix-init-_gdb-module.patch of Package mingw32-gdb

From 2be84df9a7d413dd1ed15861c9810022da6bd8ff Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Sat, 6 Apr 2024 19:53:45 +0200
Subject: [PATCH] gdb: fix initialization of python gdb module when using mingw

---
 gdb/python/python.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -ur gdb-16.3.orig/gdb/python/python.c gdb-16.3/gdb/python/python.c
--- gdb-16.3.orig/gdb/python/python.c	2025-04-20 19:22:05.000000000 +0200
+++ gdb-16.3/gdb/python/python.c	2025-06-04 16:58:34.910904300 +0200
@@ -2390,7 +2390,7 @@
   SCOPE_EXIT { XDELETEVEC (progname_copy); };
 #endif
 
-#ifdef WITH_PYTHON_PATH
+#if defined(__MINGW32__) || defined(WITH_PYTHON_PATH)
   /* Work around problem where python gets confused about where it is,
      and then can't find its libraries, etc.
      NOTE: Python assumes the following layout:
openSUSE Build Service is sponsored by