Skip to content

Commit 9ae4d2e

Browse files
authored
[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.
1 parent 7c4b2be commit 9ae4d2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/Unix/Process.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ static unsigned getColumns(int FileID) {
320320
// instead if it isn't available.
321321
unsigned Columns = 0;
322322

323-
#ifdef HAVE_SYS_IOCTL_H
323+
#if defined(HAVE_SYS_IOCTL_H) && !defined(__sun__)
324324
struct winsize ws;
325325
if (ioctl(FileID, TIOCGWINSZ, &ws) == 0)
326326
Columns = ws.ws_col;

0 commit comments

Comments
 (0)