diff mbox

[libbacktrace] Fix build on hpux10

Message ID 20121209184914.GA20230@hiauly1.hia.nrc.ca
State New
Headers show

Commit Message

John David Anglin Dec. 9, 2012, 6:49 p.m. UTC
HP-UX 10 doesn't define MAP_FAILED.  Patch fixes build.  Tested on
hppa1.1-hp-hpux10.20 and hppa2.0w-hp-hpux11.11.

OK for trunk?

Dave

Comments

Ian Lance Taylor Dec. 12, 2012, 1:52 a.m. UTC | #1
On Sun, Dec 9, 2012 at 10:49 AM, John David Anglin
<dave@hiauly1.hia.nrc.ca> wrote:
>
> 2012-12-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
>
>         * mmapio.c: Define MAP_FAILED if not defined.

This is OK.

Thanks.

Ian
diff mbox

Patch

Index: mmapio.c
===================================================================
--- mmapio.c	(revision 194272)
+++ mmapio.c	(working copy)
@@ -40,6 +40,10 @@ 
 #include "backtrace.h"
 #include "internal.h"
 
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
 /* This file implements file views and memory allocation when mmap is
    available.  */