From 62ca7743ae8fadca394164d6934599ecfff746da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Mon, 26 Nov 2018 10:57:14 +0100 Subject: [PATCH] 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. --- lib/isc/rwlock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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__) -- 2.47.3