[Solved] .mmap in chunk.c on AIX 5.2
Hiya...I was compiling up 1.4.45 on AIX 5.2 (how old ?!) and everything goes fine except for chunk.c, mod_webdav.c mod_deflate.c, network_write_mmap.c and mod_cgi.c.
It seems AIX 5.2 #define's "mmap" to "mmap64" (what were IBM thinking of?!) if its compiled with 64-bit FILE_OFFSET_64/LARGEFILE support.
This breaks these files because they have a structure member called "mmap" (as defined in chunk.h). Renaming ".mmap" to something else will fix this issue.
I understand you're unlikely to support this ancient version of the O/S, but I just thought I'd log this on the support forums so other users can
find it and maybe help themselves if they have the same issue.
Thanks for a great product.
RE: .mmap in chunk.c on AIX 5.2 - Added by gstrauss 3 months ago
Thanks for the note (and sorry to hear about your AIX 5.2 albatross)
The quickest workaround is probably to include IBM's ($%^#$%!) header before the struct chunk definition in chunk.h
--- a/src/chunk.h +++ b/src/chunk.h @@ -2,6 +2,10 @@ #define _CHUNK_H_ #include "first.h" +#ifdef _AIX /*(AIX might #define mmap mmap64)*/ +#include "sys-mmap.h" +#endif + #include "buffer.h" #include "array.h"
Does that work for you?