]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix Cygwin build after bcb9251f
authorJon Turney <jon.turney@dronecode.org.uk>
Sun, 12 Jun 2022 15:39:46 +0000 (16:39 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Wed, 2 Nov 2022 14:36:14 +0000 (14:36 +0000)
Absent _UNICODE being defined (which gdb's Makefile doesn't do),
windows.h will always define STARTUPINFO is as STARTUPINFOA, so this
cast isn't correct when create_process expects a STARTUPINFOW
parameter (i.e. in a Cygwin build).

Instead write this as &info_ex.StartupInfo (which is always of the
correct type).

gdb/nat/windows-nat.c

index ba60b585e85d2ce09a33d60ee1b35a5f5de4d34a..42031d4757c535f6fec2e6a089906552df95c3c3 100644 (file)
@@ -831,7 +831,7 @@ create_process_wrapper (FUNC *do_create_process, const CHAR *image,
                                                | EXTENDED_STARTUPINFO_PRESENT),
                                               environment,
                                               cur_dir,
-                                              (STARTUPINFO *) &info_ex,
+                                              &info_ex.StartupInfo,
                                               process_info);
              if (result)
                return_value = result;