summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-03-05 14:15:19 -0800
committerTakashi Kokubun <[email protected]>2023-03-05 23:28:59 -0800
commit1c267d0723a076d7e22e7b8f7c3360d200a239c3 (patch)
treecedf1113e5cdf286fefe8bff65eb17375183b009
parent823309debc57e3f0a13f089fff821c100f779e21 (diff)
Workaround USE_MJIT warnings
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7448
-rw-r--r--mjit.c3
-rw-r--r--mjit_c.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/mjit.c b/mjit.c
index fe5e2976a7..35ce60785b 100644
--- a/mjit.c
+++ b/mjit.c
@@ -9,6 +9,9 @@
#include "ruby/internal/config.h" // defines USE_MJIT
+// ISO C requires a translation unit to contain at least one declaration
+void rb_mjit(void) {}
+
#if USE_MJIT
#include "constant.h"
diff --git a/mjit_c.c b/mjit_c.c
index ec2eb4bd9c..9a909590e7 100644
--- a/mjit_c.c
+++ b/mjit_c.c
@@ -8,6 +8,9 @@
#include "ruby/internal/config.h" // defines USE_MJIT
+// ISO C requires a translation unit to contain at least one declaration
+void rb_mjit_c(void) {}
+
#if USE_MJIT
#include "mjit.h"