From 694559a201d1820c5427f7cc44401ba8d8ef7c12 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 26 Apr 2013 17:04:14 +0200 Subject: [PATCH] uclibc/pcre: Fix the linking of libQtCore for mips/uclibc The mips/uclibc features.h of the toolchain used by a former key account of PSO is defining both __USE_XOPEN2K and __USE_BSD this will lead to POSIX_MADV_* and MADV_* being defined while only the symbols for madvise are present. Change the order to make it link. Change-Id: If324b978d72ad2b37b8cd624562e81503c9465d4 Reviewed-by: Rafael Roquetto Reviewed-by: Andreas Holzammer Reviewed-by: Giuseppe D'Angelo --- src/3rdparty/pcre/sljit/sljitUtils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/3rdparty/pcre/sljit/sljitUtils.c b/src/3rdparty/pcre/sljit/sljitUtils.c index 1f023fa644..b29b4036b3 100644 --- a/src/3rdparty/pcre/sljit/sljitUtils.c +++ b/src/3rdparty/pcre/sljit/sljitUtils.c @@ -315,12 +315,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw SLJIT_CALL sljit_stack_resize(struct sljit_sta aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align; aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align; /* If madvise is available, we release the unnecessary space. */ -#if defined(POSIX_MADV_DONTNEED) - if (aligned_new_limit < aligned_old_limit) - posix_madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, POSIX_MADV_DONTNEED); -#elif defined(MADV_DONTNEED) +#if defined(MADV_DONTNEED) if (aligned_new_limit < aligned_old_limit) madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MADV_DONTNEED); +#elif defined(POSIX_MADV_DONTNEED) + if (aligned_new_limit < aligned_old_limit) + posix_madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, POSIX_MADV_DONTNEED); #endif stack->limit = new_limit; return 0;