diff --git a/ext/nokogiri/extconf.rb b/ext/nokogiri/extconf.rb index 4278dd6e46..0a771b684c 100644 --- a/ext/nokogiri/extconf.rb +++ b/ext/nokogiri/extconf.rb @@ -594,6 +594,10 @@ def do_clean append_ldflags(ENV["LDFLAGS"].split) unless ENV["LDFLAGS"].nil? $LIBS = concat_flags($LIBS, ENV["LIBS"]) +# nokogumbo code uses C90/C99 features, let's make sure older compilers won't give +# errors/warnings. see #2302 +append_cflags(["-std=c99", "-Wno-declaration-after-statement"]) + # always include debugging information append_cflags("-g")