1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- Fix build on 8.X

PR:		136900
Submitted by:	Alex Kozlov <spam@rm-rf.kiev.ua> (maintainer)
This commit is contained in:
Martin Wilke 2009-07-26 15:30:40 +00:00
parent a9cffccdf9
commit 7bb109597f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=238391

View File

@ -0,0 +1,26 @@
--- main.c.orig 2006-04-23 09:38:25.000000000 +0200
+++ main.c 2009-07-26 17:00:09.000000000 +0200
@@ -49,7 +49,7 @@
Initialize(int argc, char *argv[])
{
sigset_t signalset;
- struct ttysize ts;
+ struct winsize ws;
char *diskname;
Fake = FALSE;
@@ -59,11 +59,11 @@
diskname = check_arg(argc, argv);
- if (ioctl(0, TIOCGSIZE, &ts) == -1) {
+ if (ioctl(0, TIOCGWINSZ, &ws) == -1) {
msgDebug("Unable to get terminal size - errno %d\n", errno);
- ts.ts_lines = 0;
+ ws.ws_row = 0;
}
- StatusLine = ts.ts_lines ? ts.ts_lines - 1: TTY_STATUS_LINE;
+ StatusLine = ws.ws_row ? ws.ws_row - 1: TTY_STATUS_LINE;
init_dialog();