mirror of https://github.com/adamdruppe/arsd.git
fix(terminal): fix conditional binding for musl
I got the compiles import syntax wrong and the extern C.
This commit is contained in:
parent
8f3d584698
commit
2b17192187
|
|
@ -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 *);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue