public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix Cygwin build after bcb9251f
@ 2022-11-02 14:37 Jon TURNEY
  0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2022-11-02 14:37 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=559a5ea452455d95ff18736ce6dfa9065427f74e

commit 559a5ea452455d95ff18736ce6dfa9065427f74e
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sun Jun 12 16:39:46 2022 +0100

    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:
---
 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-02 14:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 14:37 [binutils-gdb] Fix Cygwin build after bcb9251f Jon TURNEY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).