From 54230dea1b54990a4b046dd9a7052aba9c33f383 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 23 Oct 2023 13:53:42 -0700 Subject: [PATCH] Don't cache on platforms without mmap We're only going to create a redblack tree on platforms that have mmap --- shape.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shape.c b/shape.c index 0dd0c109a0..a81c19cf41 100644 --- a/shape.c +++ b/shape.c @@ -380,6 +380,7 @@ rb_shape_alloc(ID edge_name, rb_shape_t * parent, enum shape_type type) return shape; } +#ifdef HAVE_MMAP static redblack_node_t * redblack_cache_ancestors(rb_shape_t * shape) { @@ -407,6 +408,13 @@ redblack_cache_ancestors(rb_shape_t * shape) } } } +#else +static redblack_node_t * +redblack_cache_ancestors(rb_shape_t * shape) +{ + return LEAF; +} +#endif static rb_shape_t * rb_shape_alloc_new_child(ID id, rb_shape_t * shape, enum shape_type shape_type)