bash-5.0 distribution sources and documentation
diff --git a/xmalloc.c b/xmalloc.c
index b32c068..ca297dc 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -51,9 +51,11 @@
 extern char *sbrk();
 #endif
 
+#if defined (HAVE_SBRK) && defined (USING_BASH_MALLOC)
 static PTR_T lbreak;
 static int brkfound;
 static size_t allocated;
+#endif
 
 /* **************************************************************** */
 /*								    */