40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
From 3b6ca044daf6a86c650b841c4005b2b6e68453fa Mon Sep 17 00:00:00 2001
|
||
From: Karel Zak <kzak@redhat.com>
|
||
Date: Wed, 18 Jul 2018 09:41:46 +0200
|
||
Subject: [PATCH 273/686] lib/pager: fix compiler warning [-Wrestrict]
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
lib/pager.c: In function ‘pager_preexec’:
|
||
lib/pager.c:148:12: warning: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Wrestrict]
|
||
|
||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||
---
|
||
lib/pager.c | 6 ++++--
|
||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||
|
||
diff --git a/lib/pager.c b/lib/pager.c
|
||
index 9740c71..b3cf6ee 100644
|
||
--- a/lib/pager.c
|
||
+++ b/lib/pager.c
|
||
@@ -141,11 +141,13 @@ static void pager_preexec(void)
|
||
* Work around bug in "less" by not starting it until we
|
||
* have real input
|
||
*/
|
||
- fd_set in;
|
||
+ fd_set in, ex;
|
||
|
||
FD_ZERO(&in);
|
||
FD_SET(STDIN_FILENO, &in);
|
||
- select(1, &in, NULL, &in, NULL);
|
||
+ ex = in;
|
||
+
|
||
+ select(STDIN_FILENO + 1, &in, NULL, &ex, NULL);
|
||
|
||
if (setenv("LESS", "FRSX", 0) != 0)
|
||
warn(_("failed to set the %s environment variable"), "LESS");
|
||
--
|
||
1.8.3.1
|
||
|