This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[obv/commit] Fix build breakage on Cygwin (PR gdb/21385)
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Thu, 13 Apr 2017 21:03:31 -0400
- Subject: [obv/commit] Fix build breakage on Cygwin (PR gdb/21385)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sergiodj at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4AE723DE3E
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4AE723DE3E
- References: <87o9w2z068.fsf@redhat.com>
On gdb/windows-nat.c:windows_create_inferior, ALLARGS needs to be
declared independently of the host that we're building for. This
fixes a build breakage on Cygwin.
2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
PR gdb/21385
* windows-nat.c (windows_create_inferior): Declare 'allargs'
independently of the host, and fix build breakage on Cygwin.
---
gdb/ChangeLog | 6 ++++++
gdb/windows-nat.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b739d8d..11d77be 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ PR gdb/21385
+ * windows-nat.c (windows_create_inferior): Declare 'allargs'
+ independently of the host, and fix build breakage on Cygwin.
+
2017-04-13 Pedro Alves <palves@redhat.com>
* inferior.c (free_inferior): Convert to ...
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index d9a4f0a..805fb43 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2433,7 +2433,6 @@ windows_create_inferior (struct target_ops *ops, const char *exec_file,
char real_path[__PMAX];
char shell[__PMAX]; /* Path to shell */
const char *toexec;
- const char *allargs = origallargs.c_str ();
char *args, *allargs_copy;
size_t args_len, allargs_len;
int fd_inp = -1, fd_out = -1, fd_err = -1;
@@ -2449,6 +2448,7 @@ windows_create_inferior (struct target_ops *ops, const char *exec_file,
size_t envsize;
char **env;
#endif /* !__CYGWIN__ */
+ const char *allargs = origallargs.c_str ();
PROCESS_INFORMATION pi;
BOOL ret;
DWORD flags = 0;
--
2.9.3