From 8e274eb3d98d71302c5a82037a4fef9422162c12 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 22 Mar 2024 16:27:01 +0000 Subject: [PATCH] Hack canonicalize_file_name (should be fixed in gnulib) Needed when cross compiling. The gnulib canonicalize_file_name override breaks finding cygwin1.dll. When compiling natively, gnulib doesn't override canonicalize_file_name, but gnulib has hardcoded defaults for cross compiling, and the default is wrong for Cygwin. Change-Id: Ief87ddf798c137fb6dff91fe0fa4c5ada6da1153 --- gdbsupport/pathstuff.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdbsupport/pathstuff.cc b/gdbsupport/pathstuff.cc index ce01c953048..ed2a3def8b1 100644 --- a/gdbsupport/pathstuff.cc +++ b/gdbsupport/pathstuff.cc @@ -72,7 +72,8 @@ gdb_realpath (const char *filename) } #else { - char *rp = canonicalize_file_name (filename); +#undef canonicalize_file_name + char *rp = canonicalize_file_name (filename); if (rp != NULL) return gdb::unique_xmalloc_ptr (rp); -- 2.47.2