[llvm] 9ae4d2e - [LLVM] [Support] Disable `ioctl()` terminal size check on Solaris (#144600)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 13:44:06 PDT 2025


Author: Sirraide
Date: 2025-06-17T22:44:02+02:00
New Revision: 9ae4d2e01331ddeb2543f1940a09ef9c76ff5268

URL: https://github.com/llvm/llvm-project/commit/9ae4d2e01331ddeb2543f1940a09ef9c76ff5268
DIFF: https://github.com/llvm/llvm-project/commit/9ae4d2e01331ddeb2543f1940a09ef9c76ff5268.diff

LOG: [LLVM] [Support] Disable `ioctl()` terminal size check on Solaris (#144600)

#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.

Added: 
    

Modified: 
    llvm/lib/Support/Unix/Process.inc

Removed: 
    


################################################################################
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;


        


More information about the llvm-commits mailing list