aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbsupport/common-defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbsupport/common-defs.h')
-rw-r--r--gdb/gdbsupport/common-defs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/gdbsupport/common-defs.h b/gdb/gdbsupport/common-defs.h
index 203bd89..3b10468 100644
--- a/gdb/gdbsupport/common-defs.h
+++ b/gdb/gdbsupport/common-defs.h
@@ -97,6 +97,11 @@
#endif
#include <errno.h>
#include <alloca.h>
+/* Must be included before pathmax.h to avoid build errors about localtime_r
+ and gmtime_r in gnulib on MinGW. This is a gnulib bug:
+ https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00022.html */
+#include <time.h>
+
#include "ansidecl.h"
/* This is defined by ansidecl.h, but we prefer gnulib's version. On