summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2016-02-06 22:27:34 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2016-02-06 22:27:34 +0000
commitcc2bfdc73bee10d18d0225389084c4e74fc7b945 (patch)
tree01d3116dd5012a80d7f69a24ca8e91758894fc83
parent744c565567f108ac7d627f4d93d95ab9e37fbd25 (diff)
downloadgcc-cc2bfdc73bee10d18d0225389084c4e74fc7b945.tar.gz
* mmap.c (MAP_FAILED): Define if not defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233196 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libbacktrace/ChangeLog4
-rw-r--r--libbacktrace/mmap.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog
index 2afa4705539..b38e2fee45c 100644
--- a/libbacktrace/ChangeLog
+++ b/libbacktrace/ChangeLog
@@ -1,3 +1,7 @@
+2016-02-06 John David Anglin <danglin@gcc.gnu.org>
+
+ * mmap.c (MAP_FAILED): Define if not defined.
+
2016-01-04 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
diff --git a/libbacktrace/mmap.c b/libbacktrace/mmap.c
index 0ed4802d02d..138ef70711a 100644
--- a/libbacktrace/mmap.c
+++ b/libbacktrace/mmap.c
@@ -50,6 +50,10 @@ POSSIBILITY OF SUCH DAMAGE. */
#define MAP_ANONYMOUS MAP_ANON
#endif
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
/* A list of free memory blocks. */
struct backtrace_freelist_struct