mirror of https://github.com/adamdruppe/arsd.git
Merge pull request #505 from skoppe/tcsetattr_musl
feat(terminal): Add bindings to support musl
This commit is contained in:
commit
8f3d584698
10
terminal.d
10
terminal.d
|
|
@ -388,6 +388,16 @@ version(Posix) {
|
|||
|
||||
import core.sys.posix.sys.ioctl;
|
||||
}
|
||||
version(CRuntime_Musl) {
|
||||
// Druntime currently doesn't have bindings for termios on Musl.
|
||||
// We define our own bindings whenever the import fails.
|
||||
// When druntime catches up, this block can slowly be removed,
|
||||
// although for backward compatibility we might want to keep it.
|
||||
static if (!__traits(compiles, import core.sys.posix.termios : tcgetattr)) {
|
||||
int tcgetattr (int, struct termios *);
|
||||
int tcsetattr (int, int, const struct termios *);
|
||||
}
|
||||
}
|
||||
|
||||
version(VtEscapeCodes) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue