From: Michał Kępień Date: Mon, 26 Nov 2018 09:57:14 +0000 (+0100) Subject: Fix compilation on CentOS 6 (i386) X-Git-Tag: v9.13.5~31^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62ca7743ae8fadca394164d6934599ecfff746da;p=thirdparty%2Fbind9.git Fix compilation on CentOS 6 (i386) The stock toolchain available on CentOS 6 for i386 is unable to use the _mm_pause() intrinsic. Fix by using "rep; nop" assembly instructions on that platform instead. --- diff --git a/lib/isc/rwlock.c b/lib/isc/rwlock.c index 98a835e8610..a914ba4ceea 100644 --- a/lib/isc/rwlock.c +++ b/lib/isc/rwlock.c @@ -44,9 +44,11 @@ #if defined(_MSC_VER) # include # define isc_rwlock_pause() YieldProcessor() -#elif defined(__x86_64__) || defined(__i386__) +#elif defined(__x86_64__) # include # define isc_rwlock_pause() _mm_pause() +#elif defined(__i386__) +# define isc_rwlock_pause() __asm__ __volatile__ ("rep; nop") #elif defined(__ia64__) # define isc_rwlock_pause() __asm__ __volatile__ ("hint @pause") #elif defined(__arm__)