summaryrefslogtreecommitdiff
path: root/source3/tdb/spinlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tdb/spinlock.c')
-rw-r--r--source3/tdb/spinlock.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/tdb/spinlock.c b/source3/tdb/spinlock.c
index a487ee2a10..e6abb3a0bc 100644
--- a/source3/tdb/spinlock.c
+++ b/source3/tdb/spinlock.c
@@ -268,8 +268,16 @@ static void yield_cpu(void)
static int this_is_smp(void)
{
-#if defined(HAVE_SYSCONF) && defined(SYSCONF_SC_NPROC_ONLN)
+#if defined(HAVE_SYSCONF)
+
+#if defined(SYSCONF_SC_NPROC_ONLN)
return (sysconf(_SC_NPROC_ONLN) > 1) ? 1 : 0;
+#elif defined(SYSCONF_SC_NPROCESSORS_ONLN)
+ return (sysconf(_SC_NPROCESSORS_ONLN) > 1) ? 1 : 0;
+#else
+ return 0;
+#endif
+
#else
return 0;
#endif