From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id B0C523858D3C; Wed, 2 Nov 2022 14:37:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0C523858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667399849; bh=l4oXsqcLYutUZM8fnwMtJtcK8zs9d6yRaICOq4Dytdc=; h=From:To:Subject:Date:From; b=BycYNQa9KoyWj5ahJcQIwXj/ozMsKZWxAFTiXtTT4aIn9EhT0DZouzsKJP5+09pHM NG3afIVQS/j7U+SPqpD9jqQIEqaCrkbcq6VVGO94hydLKDbbZvd//LGmMNxCHDviWU y1ay/W/n2s7wGI2VIjEM7D9DmT9fYCUDXnfkmWO8= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon TURNEY To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix Cygwin build after bcb9251f X-Act-Checkin: binutils-gdb X-Git-Author: Jon Turney X-Git-Refname: refs/heads/master X-Git-Oldrev: 39a28a7cf2b3854a9592e1d3d9f675394d4aef6d X-Git-Newrev: 559a5ea452455d95ff18736ce6dfa9065427f74e Message-Id: <20221102143729.B0C523858D3C@sourceware.org> Date: Wed, 2 Nov 2022 14:37:29 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D559a5ea45245= 5d95ff18736ce6dfa9065427f74e commit 559a5ea452455d95ff18736ce6dfa9065427f74e Author: Jon Turney Date: Sun Jun 12 16:39:46 2022 +0100 Fix Cygwin build after bcb9251f =20 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). =20 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 =3D result;