From bf18e04134f674830cbb96bac4c58fbcaca2854f Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Sat, 17 Mar 2012 12:43:26 +0100 Subject: [PATCH] Detect whether st.h is present and don't use RUBY_VM as the condition --- ruby/extconf.rb | 1 + ruby/pack.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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) \