--- trunk/src/utils/ProgressBar.cpp 2010/03/26 17:25:54 1419 +++ trunk/src/utils/ProgressBar.cpp 2010/03/26 18:42:55 1420 @@ -76,9 +76,9 @@ namespace OpenMD { #endif #ifndef IS_MPI // get the window width: - struct ttysize ts; - ioctl(0, TIOCGWINSZ, &ts); - width = ts.ts_cols; + struct winsize w; + ioctl(STDOUT_FILENO, TIOCGWINSZ, &w); + width = w.ws_col; #endif // We'll use: