From b49f7f7908f3cdd34244e53230ff63f4d7aa9e65 Mon Sep 17 00:00:00 2001
From: Marcus Comstedt <marcus@mc.pp.se>
Date: Sun, 31 Jan 2021 12:18:49 +0100
Subject: [PATCH] dlmalloc: Only use locks in a threaded pike

---
 src/malloc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/malloc.c b/src/malloc.c
index 74aadf170d..0d585d5cf7 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -2,7 +2,9 @@
 /* This is only used when --enable-dlmalloc is specified (default on
  * Windows). */
 #include "global.h"
+#ifdef PIKE_THREADS
 #define USE_LOCKS 1
+#endif
 #define USE_DL_PREFIX 1
 /* Further pike changes below: PMOD_EXPORTs and lines marked "PIKE". */
 /* End pike preamble */
-- 
GitLab