Skip to content

Commit aeb9b74

Browse files
Sirraidefschlimb
authored andcommitted
[LLVM] [Support] Disable ioctl() terminal size check on Solaris (llvm#144600)
llvm#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 11cc60f commit aeb9b74

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)