Skip to content

Commit 75995da

Browse files
committed
Fixed XTOP build on Mac
1 parent f8a6250 commit 75995da

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tools/xtop.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,15 +1771,19 @@ int main(int argc, char *argv[])
17711771
bar.bInSuffix = XTRUE;
17721772
bar.cLoader = '|';
17731773

1774-
xbool_t bFirst = XTRUE;
1775-
1774+
#ifdef __linux__
17761775
struct termios cliAttrs;
17771776
XCLI_SetInputMode(&cliAttrs);
1777+
#endif
1778+
1779+
xbool_t bFirst = XTRUE;
17781780

17791781
while (!g_nInterrupted)
17801782
{
1783+
#ifdef __linux__
17811784
XTOPApp_ProcessSTDIN(&ctx);
1782-
1785+
#endif
1786+
17831787
if (ctx.bClient)
17841788
{
17851789
if (XTOPApp_GetRemoteStats(&ctx, &stats) < 0)
@@ -1831,7 +1835,10 @@ int main(int argc, char *argv[])
18311835
if (!ctx.bClient)
18321836
XMon_StopMonitoring(&stats, 1000);
18331837

1838+
#ifdef __linux__
18341839
XCLI_RestoreAttributes(&cliAttrs);
1840+
#endif
1841+
18351842
XMon_DestroyStats(&stats);
18361843
XCLIWin_Destroy(&win);
18371844

0 commit comments

Comments
 (0)