summaryrefslogtreecommitdiffstats
path: root/src/if_ruby.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-11 18:01:41 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-11 18:01:41 +0200
commit81ea1dfb97af6622c9ad3efdbad317ec965ebaeb (patch)
tree51fd1d630abf2046e17da9d6b9ab21052b02efa2 /src/if_ruby.c
parent004a6781b3cf15ca5dd632c38cc09bb3b253d1f8 (diff)
patch 8.2.0541: Travis CI does not give compiler warningsv8.2.0541
Problem: Travis CI does not give compiler warnings. Solution: Add flags for warnings. Fix uncovered problems. (Ozaki Kiichi, closes #5898)
Diffstat (limited to 'src/if_ruby.c')
-rw-r--r--src/if_ruby.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 9b6d388a3c..e989c01336 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -99,6 +99,12 @@
# define rb_ary_detransient rb_ary_detransient_stub
#endif
+// On macOS pre-installed Ruby defines "SIZEOF_TIME_T" as "SIZEOF_LONG" so it
+// conflicts with the definition in config.h then causes macro-redifned warning.
+#ifdef SIZEOF_TIME_T
+# undef SIZEOF_TIME_T
+#endif
+
#include <ruby.h>
#if RUBY_VERSION >= 19
# include <ruby/encoding.h>