From c9c157c7650a7570123869445e7dd331ecdd3317 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Fri, 20 May 2022 14:35:57 +0100 Subject: Fix Cygwin build after fcab5839 Fix Cygwin build after fcab5839 ("Implement pid_to_exec_file for Windows in gdbserver"). That change moves code from gdb/windows-nat.c to gdb/nat/windows-nat.c, but doesn't add the required typedefs and includes for parts of that code under ifdef __CYGWIN__. --- gdb/nat/windows-nat.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gdb/nat') diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c index 71a18a0..f681801 100644 --- a/gdb/nat/windows-nat.c +++ b/gdb/nat/windows-nat.c @@ -21,8 +21,15 @@ #include "gdbsupport/common-debug.h" #include "target/target.h" -#ifdef __CYGWIN__ +#undef GetModuleFileNameEx + +#ifndef __CYGWIN__ +#define GetModuleFileNameEx GetModuleFileNameExA +#else +#include #define __USEWIDE +typedef wchar_t cygwin_buf_t; +#define GetModuleFileNameEx GetModuleFileNameExW #endif namespace windows_nat -- cgit v1.1