Allow compilation of 3rdparty/pcre on QNX

Change-Id: If9a56d5e042c8da9626feab377388e9bfc22b129
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Sean Harmer 2012-03-07 18:22:39 +00:00 committed by Qt by Nokia
parent 278ddc9d5e
commit fd4c61c75e

View File

@ -233,7 +233,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_w SLJIT_CALL sljit_stack_resize(struct sljit_stac
aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;
aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;
if (aligned_new_limit < aligned_old_limit)
#ifdef __QNXNTO__
posix_madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, POSIX_MADV_DONTNEED);
#else
madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MADV_DONTNEED);
#endif
stack->limit = new_limit;
return 0;
#endif