26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
From 86033acaa1dbc61833142ffa60cee0f1a0fb4a14 Mon Sep 17 00:00:00 2001
|
|
Patch-Source: https://github.com/dotnet/runtime/pull/82676
|
|
From: Antoine Martin <dev@ayakael.net>
|
|
Date: Sat, 25 Feb 2023 14:39:43 -0500
|
|
Subject: [PATCH] pal_console.c: cast TIOCSWINSZ to int when
|
|
HAVE_IOCTL_WITH_INT_REQUEST
|
|
|
|
---
|
|
src/native/libs/System.Native/pal_console.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/runtime/src/native/libs/System.Native/pal_console.c b/src/runtime/src/native/libs/System.Native/pal_console.c
|
|
index d217075e5..52241f47d 100644
|
|
--- a/src/runtime/src/native/libs/System.Native/pal_console.c
|
|
+++ b/src/runtime/src/native/libs/System.Native/pal_console.c
|
|
@@ -43,7 +43,9 @@ int32_t SystemNative_SetWindowSize(WinSize* windowSize)
|
|
{
|
|
assert(windowSize != NULL);
|
|
|
|
-#if HAVE_IOCTL && HAVE_TIOCSWINSZ
|
|
+#if HAVE_IOCTL_WITH_INT_REQUEST && HAVE_TIOCSWINSZ
|
|
+ return ioctl(STDOUT_FILENO, (int)TIOCSWINSZ, windowSize);
|
|
+#elif HAVE_IOCTL && HAVE_TIOCSWINSZ
|
|
return ioctl(STDOUT_FILENO, TIOCSWINSZ, windowSize);
|
|
#else
|
|
// Not supported on e.g. Android. Also, prevent a compiler error because windowSize is unused
|