Skip to content

Commit 2f17704

Browse files
etcusrvarcarlocab
andcommitted
ncurses: update CFLAGS when building with gcc>=15
When building from source on Linux with gcc >= 15, the compile fails. Unless CFLAGS contains this flag. Co-authored-by: Carlo Cabrera <[email protected]>
1 parent 4cc4b33 commit 2f17704

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Formula/n/ncurses.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ def install
5252
]
5353
args << "--with-terminfo-dirs=#{share}/terminfo:/etc/terminfo:/lib/terminfo:/usr/share/terminfo" if OS.linux?
5454

55+
odie "`-std=gnu17` workaround should be removed!" if build.stable? && version > "6.5"
56+
ENV.append_to_cflags "-std=gnu17" if OS.linux? && DevelopmentTools.gcc_version("gcc") >= 15
57+
5558
system "./configure", *args
5659
system "make", "install"
5760
make_libncurses_symlinks

0 commit comments

Comments
 (0)