aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/common-defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdbsupport/common-defs.h')
-rw-r--r--gdbsupport/common-defs.h5
1 files changed, 5 insertions, 0 deletions
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>