From 90a7eb5a76048884d5d56bf6b9369f1e67fdbcd7 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Wed, 11 Oct 2023 16:03:44 +0800 Subject: [PATCH] Fix `ioctl` on Android Ref: crystal-lang/crystal#13884 --- src/term_size.cr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/term_size.cr b/src/term_size.cr index d0a4c2e..fd0c604 100644 --- a/src/term_size.cr +++ b/src/term_size.cr @@ -145,6 +145,10 @@ end {% end %} {% end %} - fun ioctl(fd : Int, request : ULong, ...) : Int + {% if flag?(:android) %} + fun ioctl(__fd : Int, __request : Int, ...) : Int + {% else %} + fun ioctl(fd : Int, request : ULong, ...) : Int + {% end %} end {% end %}