From 15f1279b770352d2bd54168f18ef2728d77ec8d0 Mon Sep 17 00:00:00 2001 From: Justin M. Forbes Date: Feb 05 2018 21:19:14 +0000 Subject: Build fix for gcc 8 --- 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 0000000..37c0f04 --- /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 +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 +Cc: Arnaldo Carvalho de Melo +Signed-off-by: Andrew Morton +Signed-off-by: Stephen Rothwell +--- + 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 + diff --git a/kernel-tools.spec b/kernel-tools.spec index 4f23f0b..05830b8 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -111,6 +111,7 @@ Patch3: 0001-tools-include-Sync-vmx.h-header-for-FSF-removal.patch Patch4: 0001-tools-lib-Remove-FSF-address.patch Patch5: 0001-tools-power-Don-t-make-man-pages-executable.patch Patch6: 0002-perf-Don-t-make-sourced-script-executable.patch +Patch7: 0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch Name: kernel-tools Summary: Assortment of tools for the Linux kernel License: GPLv2 @@ -185,6 +186,7 @@ cd linux-%{kversion} %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # END OF PATCH APPLICATIONS