summaryrefslogtreecommitdiff
path: root/io_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'io_buffer.c')
-rw-r--r--io_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_buffer.c b/io_buffer.c
index 71136d4eb6..fb18e729a6 100644
--- a/io_buffer.c
+++ b/io_buffer.c
@@ -1239,7 +1239,7 @@ rb_io_buffer_resize(VALUE self, size_t size)
rb_raise(rb_eIOBufferAccessError, "Cannot resize external buffer!");
}
-#ifdef MREMAP_MAYMOVE
+#if defined(HAVE_MREMAP) && defined(MREMAP_MAYMOVE)
if (data->flags & RB_IO_BUFFER_MAPPED) {
void *base = mremap(data->base, data->size, size, MREMAP_MAYMOVE);