about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-06-17 18:10:44 -0700
committerEric Wong <normalperson@yhbt.net>2011-06-17 18:10:44 -0700
commit72ab71667b2a9c27d1eda73aacb8b86187f317d0 (patch)
treed1092f9dbd75ddbc94db2d546a76725cb80f8b38
parent079f9227dce2e69bd3460c783e12fa05c687b7d3 (diff)
downloadkgio-72ab71667b2a9c27d1eda73aacb8b86187f317d0.tar.gz
In case the toolchain can't test the feature properly
or Ruby is upgraded and the symbol is added.
-rw-r--r--ext/kgio/ancient_ruby.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/kgio/ancient_ruby.h b/ext/kgio/ancient_ruby.h
index 014e4b8..e85ee60 100644
--- a/ext/kgio/ancient_ruby.h
+++ b/ext/kgio/ancient_ruby.h
@@ -2,11 +2,12 @@
 #define MISSING_ANCIENT_RUBY_H
 
 #ifndef HAVE_RB_STR_SET_LEN
-static void rb_str_set_len(VALUE str, long len)
+static void my_str_set_len(VALUE str, long len)
 {
         RSTRING(str)->len = len;
         RSTRING(str)->ptr[len] = '\0';
 }
+#define rb_str_set_len(str,len) my_str_set_len((str),(len))
 #endif /* ! HAVE_RB_STR_SET_LEN */
 
 #ifndef RSTRING_PTR