aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport
diff options
context:
space:
mode:
Diffstat (limited to 'gdbsupport')
-rw-r--r--gdbsupport/ChangeLog4
-rw-r--r--gdbsupport/common-defs.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog
index 78fbbe6..b071049 100644
--- a/gdbsupport/ChangeLog
+++ b/gdbsupport/ChangeLog
@@ -1,3 +1,7 @@
+2020-04-27 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * common-defs.h: Include cstdlib.h.
+
2020-04-20 Tom Tromey <tromey@adacore.com>
* scoped_mmap.h (scoped_mmap): Mark move constructor as noexcept.
diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h
index e42d2b8..d3f5eaf 100644
--- a/gdbsupport/common-defs.h
+++ b/gdbsupport/common-defs.h
@@ -84,7 +84,12 @@
#include <stdarg.h>
#include <stdio.h>
+
+/* Include both cstdlib and stdlib.h to ensure we have standard functions
+ defined both in the std:: namespace and in the global namespace. */
+#include <cstdlib>
#include <stdlib.h>
+
#include <stddef.h>
#include <stdint.h>
#include <string.h>