diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-12-22 12:42:24 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-12-23 13:21:03 +0200 |
commit | 8fbad19958c9b9c06a710bf7d6589d52f1ed8a64 (patch) | |
tree | e6ceb6f0411a6a24252007d3e2f45853600d764c /gdb/nat | |
parent | 8d25f5ef2cb029a889135f41b6451dcccd187391 (diff) | |
download | fsf-binutils-gdb-8fbad19958c9b9c06a710bf7d6589d52f1ed8a64.zip fsf-binutils-gdb-8fbad19958c9b9c06a710bf7d6589d52f1ed8a64.tar.gz fsf-binutils-gdb-8fbad19958c9b9c06a710bf7d6589d52f1ed8a64.tar.bz2 |
Fix MinGW build using mingw.org's MinGW
This allows to build GDB even though the default value of
_WIN32_WINNT is lower than the one needed to expose some
new APIs used here, and leave the test for their actual
support to run time.
* gdb/nat/windows-nat.c (EXTENDED_STARTUPINFO_PRESENT): Define if
not defined.
(create_process_wrapper): Use 'gdb_lpproc_thread_attribute_list'
instead of 'PPROC_THREAD_ATTRIBUTE_LIST' (which might not be defined
at compile time). This fixes compilation error using mingw.org's
MinGW.
Diffstat (limited to 'gdb/nat')
-rw-r--r-- | gdb/nat/windows-nat.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c index 42031d4..0617cfe 100644 --- a/gdb/nat/windows-nat.c +++ b/gdb/nat/windows-nat.c @@ -800,6 +800,10 @@ create_process_wrapper (FUNC *do_create_process, const CHAR *image, gdb_lpproc_thread_attribute_list lpAttributeList; }; +# ifndef EXTENDED_STARTUPINFO_PRESENT +# define EXTENDED_STARTUPINFO_PRESENT 0x00080000 +# endif + gdb_extended_info info_ex {}; if (startup_info != nullptr) @@ -810,7 +814,7 @@ create_process_wrapper (FUNC *do_create_process, const CHAR *image, call always fails, by design. */ InitializeProcThreadAttributeList (nullptr, 1, 0, &size); info_ex.lpAttributeList - = (PPROC_THREAD_ATTRIBUTE_LIST) alloca (size); + = (gdb_lpproc_thread_attribute_list) alloca (size); InitializeProcThreadAttributeList (info_ex.lpAttributeList, 1, 0, &size); |