aboutsummaryrefslogtreecommitdiffstats
path: root/main/apk-tools/0005-apk-default-screen-width-70-if-ioctl-says-0-as-width.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/apk-tools/0005-apk-default-screen-width-70-if-ioctl-says-0-as-width.patch')
-rw-r--r--main/apk-tools/0005-apk-default-screen-width-70-if-ioctl-says-0-as-width.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/apk-tools/0005-apk-default-screen-width-70-if-ioctl-says-0-as-width.patch b/main/apk-tools/0005-apk-default-screen-width-70-if-ioctl-says-0-as-width.patch
new file mode 100644
index 0000000000..887e646a66
--- /dev/null
+++ b/main/apk-tools/0005-apk-default-screen-width-70-if-ioctl-says-0-as-width.patch
@@ -0,0 +1,25 @@
+From 595c66595c549b7d595463cdfb932afe8d3c3540 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Fri, 22 Apr 2011 11:13:32 +0300
+Subject: [PATCH 5/7] apk: default screen width 70 if ioctl says 0 as width
+
+---
+ src/apk.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/apk.c b/src/apk.c
+index c40cc20..f0349e4 100644
+--- a/src/apk.c
++++ b/src/apk.c
+@@ -249,7 +249,7 @@ static void setup_terminal(void)
+ setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
+ if (ioctl(STDERR_FILENO,TIOCGWINSZ, &w) == 0)
+ apk_screen_width = w.ws_col;
+- else
++ if (apk_screen_width == 0)
+ apk_screen_width = 70;
+ if (isatty(STDOUT_FILENO) && isatty(STDERR_FILENO) && isatty(STDIN_FILENO))
+ apk_flags |= APK_PROGRESS;
+--
+1.7.4.5
+