diff options
author | Justin M. Forbes <jforbes@fedoraproject.org> | 2018-02-05 12:54:33 -0600 |
---|---|---|
committer | Justin M. Forbes <jforbes@fedoraproject.org> | 2018-02-05 12:54:33 -0600 |
commit | a6987219162e71eb8eb508a91474f633a42e96c9 (patch) | |
tree | edac99a503bbbe162162293bed94daba761b9056 /0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch | |
parent | 2a778f5d34d9096b454abea6b1b8e1a5d4fa91df (diff) | |
download | kernel-a6987219162e71eb8eb508a91474f633a42e96c9.tar.gz kernel-a6987219162e71eb8eb508a91474f633a42e96c9.tar.xz kernel-a6987219162e71eb8eb508a91474f633a42e96c9.zip |
Linux v4.15-10668-g35277995e179
Diffstat (limited to '0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch')
-rw-r--r-- | 0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch b/0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch new file mode 100644 index 000000000..37c0f041e --- /dev/null +++ b/0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch @@ -0,0 +1,44 @@ +From 85721e6bfc5da3c8f7971c4acb1a0ad16fb2c16a Mon Sep 17 00:00:00 2001 +From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> +Date: Thu, 1 Feb 2018 13:29:38 +1100 +Subject: [PATCH] tools/lib/subcmd/pager.c: do not alias select() params + +Use a separate fd set for select()-s exception fds param to fix the +following gcc warning: + +pager.c:36:12: error: passing argument 2 to restrict-qualified + parameter aliases with argument 4 [-Werror=restrict] + select(1, &in, NULL, &in, NULL); + ^~~ ~~~ + +Link: http://lkml.kernel.org/r/20180101105626.7168-1-sergey.senozhatsky@gmail.com +Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> +Cc: Arnaldo Carvalho de Melo <acme@redhat.com> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> +--- + tools/lib/subcmd/pager.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tools/lib/subcmd/pager.c b/tools/lib/subcmd/pager.c +index 5ba754d17952..9997a8805a82 100644 +--- a/tools/lib/subcmd/pager.c ++++ b/tools/lib/subcmd/pager.c +@@ -30,10 +30,13 @@ static void pager_preexec(void) + * have real input + */ + fd_set in; ++ fd_set exception; + + FD_ZERO(&in); ++ FD_ZERO(&exception); + FD_SET(0, &in); +- select(1, &in, NULL, &in, NULL); ++ FD_SET(0, &exception); ++ select(1, &in, NULL, &exception, NULL); + + setenv("LESS", "FRSX", 0); + } +-- +2.14.3 + |