Peter O'Gorman wrote:
> Just doing the same thing as gnulib does will show the failure:
>
> int main(){
> void * address = NULL;
> static int fd =-1;
> int ret = 0;
> fd = open ("/dev/zero",O_RDONLY,666);
> ret = mmap (NULL, 4096, PROT_READ | PROT_WRITE, MAP_FILE |
> MAP_PRIVATE, fd, 0);
> if (ret != MAP_FAILED) return 0;
> return 1;
> }
Are you sure that this is what gnulib does? Darwin's <sys/mman.h> defines
MAP_ANON, then gnulib's m4/mmap-anon.m4 macro ought to add
#define MAP_ANONYMOUS MAP_ANON
#define HAVE_MAP_ANONYMOUS 1
to config.h, and then lib/pagealign_alloc.c should be doing
mmap (NULL, 4096, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);
Is pagealign_alloc.c doing this or not?
Bruno
_______________________________________________
bug-gnulib mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnulib