[llvm] [LLVM] [Support] Disable `ioctl()` terminal size check on Solaris (PR #144600)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 17 13:44:00 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-support
Author: None (Sirraide)
<details>
<summary>Changes</summary>
#<!-- -->143514 broke the `clang-solaris11-sparcv9` bot; from what I can tell that’s Solaris and according to `SolarisTargetInfo::getOSDefines`, the macro `__sun__` should be defined on Solaris, so check for that and don’t try to query the terminal size if it is defined.
Not sure this is the best solution but hopefully it fixes the bot.
---
Full diff: https://github.com/llvm/llvm-project/pull/144600.diff
1 Files Affected:
- (modified) llvm/lib/Support/Unix/Process.inc (+1-1)
``````````diff
diff --git a/llvm/lib/Support/Unix/Process.inc b/llvm/lib/Support/Unix/Process.inc
index db735b7484ad8..c6e79af44b9b4 100644
--- a/llvm/lib/Support/Unix/Process.inc
+++ b/llvm/lib/Support/Unix/Process.inc
@@ -320,7 +320,7 @@ static unsigned getColumns(int FileID) {
// instead if it isn't available.
unsigned Columns = 0;
-#ifdef HAVE_SYS_IOCTL_H
+#if defined(HAVE_SYS_IOCTL_H) && !defined(__sun__)
struct winsize ws;
if (ioctl(FileID, TIOCGWINSZ, &ws) == 0)
Columns = ws.ws_col;
``````````
</details>
https://github.com/llvm/llvm-project/pull/144600
More information about the llvm-commits
mailing list