diff options
-rw-r--r-- | ext/json/ext/parser/extconf.rb | 1 | ||||
-rw-r--r-- | ext/json/ext/parser/parser.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ext/json/ext/parser/extconf.rb b/ext/json/ext/parser/extconf.rb index f61fc94..d2438cd 100644 --- a/ext/json/ext/parser/extconf.rb +++ b/ext/json/ext/parser/extconf.rb @@ -12,4 +12,5 @@ if CONFIG['CC'] =~ /gcc/ end have_header("re.h") +have_header("ruby/st.h") create_makefile 'json/ext/parser' diff --git a/ext/json/ext/parser/parser.h b/ext/json/ext/parser/parser.h index ab02b51..877ef67 100644 --- a/ext/json/ext/parser/parser.h +++ b/ext/json/ext/parser/parser.h @@ -13,7 +13,11 @@ #else #define FORCE_UTF8(obj) #endif +#ifdef HAVE_RUBY_ST_H #include "ruby/st.h" +#else +#include "st.h" +#endif #define option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key)) |