From bc947d5644d6311fa23625627613b1465eace777 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Fri, 6 Aug 2021 10:54:25 -0400 Subject: [PATCH] ext: explicitly allow C90 and C99 features Related to #2302 and #2303. --- ext/nokogiri/extconf.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/nokogiri/extconf.rb b/ext/nokogiri/extconf.rb index 4278dd6e46..fb36a0ff6e 100644 --- a/ext/nokogiri/extconf.rb +++ b/ext/nokogiri/extconf.rb @@ -594,6 +594,9 @@ def do_clean append_ldflags(ENV["LDFLAGS"].split) unless ENV["LDFLAGS"].nil? $LIBS = concat_flags($LIBS, ENV["LIBS"]) +# c99 is old enough to drink +append_cflags(["-std=c99", "-Wno-declaration-after-statement"]) + # always include debugging information append_cflags("-g")