summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2021-04-29 14:31:05 +0200
committerBenoit Daloze <eregontp@gmail.com>2021-05-04 14:56:55 +0200
commit68d6bd0873557c12bec6f8e0f8db622f1499d8a7 (patch)
treedd50dae6ebbf714d19e3db7272f0d9b6af86223e /gc.c
parent229cbeba8c928dc6ee5eb21951e00c43a6e5225c (diff)
Fix trivial -Wundef warnings
* See [Feature #17752] Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4428
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 1507be6642..4eb5488463 100644
--- a/gc.c
+++ b/gc.c
@@ -830,7 +830,7 @@ enum {
};
#define HEAP_PAGE_ALIGN (1 << HEAP_PAGE_ALIGN_LOG)
#define HEAP_PAGE_SIZE HEAP_PAGE_ALIGN
-#if defined(HAVE_MMAP) && (PAGE_SIZE <= HEAP_PAGE_SIZE)
+#if defined(HAVE_MMAP) && (!defined(PAGE_SIZE) || PAGE_SIZE <= HEAP_PAGE_SIZE)
# define USE_MMAP_ALIGNED_ALLOC 1
#else
# define USE_MMAP_ALIGNED_ALLOC 0