Merge pull request #506 from skoppe/musl_tcsetattr_fix

fix(terminal): fix conditional binding for musl
This commit is contained in:
Adam D. Ruppe 2025-05-28 14:00:03 -04:00 committed by GitHub
commit f1d9574227
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -393,9 +393,11 @@ version(CRuntime_Musl) {
// We define our own bindings whenever the import fails. // We define our own bindings whenever the import fails.
// When druntime catches up, this block can slowly be removed, // When druntime catches up, this block can slowly be removed,
// although for backward compatibility we might want to keep it. // although for backward compatibility we might want to keep it.
static if (!__traits(compiles, import core.sys.posix.termios : tcgetattr)) { static if (!__traits(compiles, { import core.sys.posix.termios : tcgetattr; })) {
int tcgetattr (int, struct termios *); extern (C) {
int tcsetattr (int, int, const struct termios *); int tcgetattr (int, termios *);
int tcsetattr (int, int, const termios *);
}
} }
} }