diff --git a/ruby/extconf.rb b/ruby/extconf.rb index 10a807e7..4082a92f 100644 --- a/ruby/extconf.rb +++ b/ruby/extconf.rb @@ -1,5 +1,6 @@ require 'mkmf' require './version.rb' $CFLAGS << %[ -I.. -Wall -O3 -DMESSAGEPACK_VERSION=\\"#{MessagePack::VERSION}\\" -g] +have_header("ruby/st.h") create_makefile('msgpack') diff --git a/ruby/pack.c b/ruby/pack.c index 35717090..c09bf0f1 100644 --- a/ruby/pack.c +++ b/ruby/pack.c @@ -40,8 +40,8 @@ static ID s_append; #include "msgpack/pack_template.h" -#ifndef RUBY_VM -#include "st.h" // ruby hash +#ifdef HAVE_RUBY_ST_H +#include "ruby/st.h" // ruby hash #endif #define ARG_BUFFER(name, argc, argv) \