While compiling from CVS, monitor_mm.c on AIX 4.2.1, gcc gives the following error: monitor_mm.c: In function `mm_create': monitor_mm.c:87: `MAP_FAILED' undeclared (first use in this function) monitor_mm.c:87: (Each undeclared identifier is reported only once monitor_mm.c:87: for each function it appears in.) make: *** [monitor_mm.o] Error 1 This does not occur on AIX 4.3.3, where /usr/include/sys/mman.h contains "#define MAP_FAILED ((void *)-1)". Adding this #define to monitor_mm.c allows it to compile and run. I'm not sure what the proper fix is. AIX 4.2.1 is no longer supported by IBM but some boxes are still running it.
Created attachment 62 [details] Does this patch help?
FYI.. I'd like to avoid adding more to the current include.h, defines.h, etc. We were in the middle of a proposed rewrite to simplify the header hell that is plaguing us. If no other platforms require this, then I think we should fix it for AIX only and then come back to it after the header header rewrites. - Ben
This breaks on HP-UX 10.26 also. If I defined MAP_FAILED as in the attachment for this bug I can complie HP-UX (took some info to get it to compile from bug <http://bugzilla.mindrot.org/show_bug.cgi?id=184>)
If we move it into (at the bottom) of includes.h will that solve it for both platforms? If so I'll just handle it that way and we will have to ensure to remember it when we finish up the header cleanup. - Ben
Attached patch (#61) fixes the compile error on AIX 4.2.1. Putting the same #define at the bottom of includes.h instead also works.
Commited to CVS tree.
Mass change of RESOLVED bugs to CLOSED