aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/pathstuff.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-11-09 06:55:39 -0700
committerTom Tromey <tromey@adacore.com>2020-11-10 13:12:59 -0700
commit6c51cf513d98adcf34a342c7e9d885a6c788cda8 (patch)
tree5f10169af243f3e21b89680851f23b091b6397aa /gdbsupport/pathstuff.h
parented1afd86668781159a131dc9c9c4a54a3b0a1e3a (diff)
downloadbinutils-6c51cf513d98adcf34a342c7e9d885a6c788cda8.zip
binutils-6c51cf513d98adcf34a342c7e9d885a6c788cda8.tar.gz
binutils-6c51cf513d98adcf34a342c7e9d885a6c788cda8.tar.bz2
Move include block to pathstuff.h
A recent commit caused pathstuff.cc to fail to compile on mingw, like: ../../binutils-gdb/gdbsupport/pathstuff.cc:324:1: error: no previous declaration for 'std::string find_gdb_home_config_file(const char*, _stati64*)' [-Werror=missing-declarations] Some newly-added #includes were changing which "stat" was being seen by the compiler. This patch moves the includes to the header, so that the declaration and definition now agree. 2020-11-10 Tom Tromey <tromey@adacore.com> PR build/26848: * pathstuff.h: Move include block here... * pathstuff.cc: ... from here.
Diffstat (limited to 'gdbsupport/pathstuff.h')
-rw-r--r--gdbsupport/pathstuff.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdbsupport/pathstuff.h b/gdbsupport/pathstuff.h
index 996c8f2..7e35f62 100644
--- a/gdbsupport/pathstuff.h
+++ b/gdbsupport/pathstuff.h
@@ -22,6 +22,10 @@
#include "gdbsupport/byte-vector.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
/* Path utilities. */
/* Return the real path of FILENAME, expanding all the symbolic links.