From aab4a28fb5e7871734aace6a626bbafe57c60909 Mon Sep 17 00:00:00 2001 From: AJ Alt Date: Sun, 27 Oct 2024 23:24:29 +0000 Subject: [PATCH] Update TIOCGWINSZ constant for ffm on arm mac (#239) --- .../terminalinterface/ffm/TerminalInterface.ffm.macos.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mordant-jvm-ffm/src/jvmMain/kotlin/com/github/ajalt/mordant/terminal/terminalinterface/ffm/TerminalInterface.ffm.macos.kt b/mordant-jvm-ffm/src/jvmMain/kotlin/com/github/ajalt/mordant/terminal/terminalinterface/ffm/TerminalInterface.ffm.macos.kt index 7da927da6..3d4a11a7d 100644 --- a/mordant-jvm-ffm/src/jvmMain/kotlin/com/github/ajalt/mordant/terminal/terminalinterface/ffm/TerminalInterface.ffm.macos.kt +++ b/mordant-jvm-ffm/src/jvmMain/kotlin/com/github/ajalt/mordant/terminal/terminalinterface/ffm/TerminalInterface.ffm.macos.kt @@ -69,7 +69,10 @@ internal class TerminalInterfaceFfmMacos : TerminalInterfaceJvmPosix() { override val termiosConstants: TermiosConstants get() = MacosTermiosConstants private companion object { - const val TIOCGWINSZ = 0x00005413 + val TIOCGWINSZ = when (System.getProperty("os.arch")) { + "x86", "amd64" -> 0x00005413 + else -> 0x40087468 + } const val TCSADRAIN: Int = 0x1 }