Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From f0d69774afb27ffc62bf353465fba145e70cb85a Mon Sep 17 00:00:00 2001 |
| 2 | From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> |
| 3 | Date: Mon, 4 Sep 2017 11:05:08 +0200 |
| 4 | Subject: [PATCH] ioctl.c: Fix build with linux 4.13 |
| 5 | |
| 6 | git/ioctl.c:1127:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] |
| 7 | {0, }, |
| 8 | ^ |
| 9 | note: (near initialization for 'verbosity_ctl_dir[1]') |
| 10 | git/ioctl.c:1136:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] |
| 11 | {0, }, |
| 12 | ^ |
| 13 | |
| 14 | Linux kernel has added -Werror=designated-init around 4.11 (c834f0e8a8b) |
| 15 | triggering build errors with gcc 5 and 6 (but not with gcc 4) |
| 16 | |
| 17 | Upstream-Status: Backport |
| 18 | |
| 19 | Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> |
| 20 | Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> |
| 21 | --- |
| 22 | ioctl.c | 4 ++-- |
| 23 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 24 | |
| 25 | diff --git a/ioctl.c b/ioctl.c |
| 26 | index 0385203..8d4a162 100644 |
| 27 | --- a/ioctl.c |
| 28 | +++ b/ioctl.c |
| 29 | @@ -1124,7 +1124,7 @@ static struct ctl_table verbosity_ctl_dir[] = { |
| 30 | .mode = 0644, |
| 31 | .proc_handler = proc_dointvec, |
| 32 | }, |
| 33 | - {0, }, |
| 34 | + {}, |
| 35 | }; |
| 36 | |
| 37 | static struct ctl_table verbosity_ctl_root[] = { |
| 38 | @@ -1133,7 +1133,7 @@ static struct ctl_table verbosity_ctl_root[] = { |
| 39 | .mode = 0555, |
| 40 | .child = verbosity_ctl_dir, |
| 41 | }, |
| 42 | - {0, }, |
| 43 | + {}, |
| 44 | }; |
| 45 | static struct ctl_table_header *verbosity_sysctl_header; |
| 46 | static int __init init_cryptodev(void) |
| 47 | -- |
| 48 | 2.7.4 |
| 49 | |