Applied with modifications: > -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT > +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT && (!defined __KLIBC__ || HAVE_MMAP)
There's a comment two lines above, that explains why HAVE_MMAP is not the right test here. And since you write "OS/2 kLIBC has <sys/mman.h> and mprotect() but not mmap()", defined __KLIBC__ implies !HAVE_MMAP. Bruno