fix build on m68k with uclibc

uclibc on m68k defines _POSIX_SPIN_LOCKS but does not define
pthread_spin_unlock so check for this function before using
pthread_spin_xxx functions

Fixes:
 - http://autobuild.buildroot.org/results/ed923bcc1454ce90444b8dac7c064b5f4ea4a0a5

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
pull/4123/head
Fabrice Fontaine 6 years ago committed by Victor Julien
parent 86fabef093
commit 9b05db7db0

@ -869,6 +869,8 @@
exit 1
fi
AC_CHECK_FUNCS([pthread_spin_unlock])
# libjansson
AC_ARG_WITH(libjansson_includes,
[ --with-libjansson-includes=DIR libjansson include directory],

@ -155,7 +155,7 @@ enum {
#define SCCtrlCondDestroy pthread_cond_destroy
/* spinlocks */
#if ((_POSIX_SPIN_LOCKS - 200112L) < 0L) || defined HELGRIND
#if ((_POSIX_SPIN_LOCKS - 200112L) < 0L) || defined HELGRIND || !defined(HAVE_PTHREAD_SPIN_UNLOCK)
#define SCSpinlock SCMutex
#define SCSpinLock(spin) SCMutexLock((spin))
#define SCSpinTrylock(spin) SCMutexTrylock((spin))

Loading…
Cancel
Save