From: Jon Turney Date: Sun, 12 Jun 2022 15:39:46 +0000 (+0100) Subject: Fix Cygwin build after bcb9251f X-Git-Tag: gdb-13-branchpoint~626 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=559a5ea452455d95ff18736ce6dfa9065427f74e;p=thirdparty%2Fbinutils-gdb.git 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). --- 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;