From 559a5ea452455d95ff18736ce6dfa9065427f74e Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sun, 12 Jun 2022 16:39:46 +0100 Subject: [PATCH] Fix Cygwin build after bcb9251f 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c index ba60b585e85..42031d4757c 100644 --- a/gdb/nat/windows-nat.c +++ b/gdb/nat/windows-nat.c @@ -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; -- 2.39.5