Skip to content

Commit bdaa65d

Browse files
authored
Merge pull request #104 from ruby/fix_c23_error
Use -std=gnu17 to avoid C23 errors
2 parents 5a75df4 + e5e64a1 commit bdaa65d

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

ext/curses/extconf.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,8 @@ def exec_command(cmd)
6767
FileUtils.cp("pdcurses.lib", pdcurses_dir)
6868
$pdcurses_dll_default = true
6969
else
70-
if $x64
71-
exec_command "make -f Makefile.mng clean all _w64=1 WIDE=Y DLL=N"
72-
else
73-
exec_command "make -f Makefile.mng clean all WIDE=Y DLL=N"
74-
end
70+
w64 = $x64 ? "_w64=1" : ""
71+
exec_command "make -f Makefile.mng clean all #{w64} WIDE=Y DLL=N CC=\"gcc -std=gnu17\""
7572
FileUtils.cp("pdcurses.a", File.expand_path("libpdcurses.a", pdcurses_dir))
7673
end
7774
ensure

0 commit comments

Comments
 (0)