Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / net / open-iscsi / patches / 0023-iscsi_if.h-replace-zero-length-array-with-flexible-a.patch
1 From d4ed4972df1ffe9381e33f2800f8e574f632948c Mon Sep 17 00:00:00 2001
2 From: rpm-build <rpm-build>
3 Date: Mon, 2 Mar 2020 15:21:30 -0800
4 Subject: [PATCH 1/1] iscsi_if.h replace zero-length array with flexible-array
5 member
6
7 ---
8 include/iscsi_if.h | 10 +++++-----
9 1 file changed, 5 insertions(+), 5 deletions(-)
10
11 diff --git a/include/iscsi_if.h b/include/iscsi_if.h
12 index 2d46214..e8cee0d 100644
13 --- a/include/iscsi_if.h
14 +++ b/include/iscsi_if.h
15 @@ -337,7 +337,7 @@ enum iscsi_param_type {
16 struct iscsi_param_info {
17 uint32_t len; /* Actual length of the param value */
18 uint16_t param; /* iscsi param */
19 - uint8_t value[0]; /* length sized value follows */
20 + uint8_t value[]; /* length sized value follows */
21 } __attribute__((__packed__));
22
23 struct iscsi_iface_param_info {
24 @@ -346,7 +346,7 @@ struct iscsi_iface_param_info {
25 uint16_t param; /* iscsi param value */
26 uint8_t iface_type; /* IPv4 or IPv6 */
27 uint8_t param_type; /* iscsi_param_type */
28 - uint8_t value[0]; /* length sized value follows */
29 + uint8_t value[]; /* length sized value follows */
30 } __attribute__((__packed__));
31
32 /*
33 @@ -723,7 +723,7 @@ enum iscsi_flashnode_param {
34 struct iscsi_flashnode_param_info {
35 uint32_t len; /* Actual length of the param */
36 uint16_t param; /* iscsi param value */
37 - uint8_t value[0]; /* length sized value follows */
38 + uint8_t value[]; /* length sized value follows */
39 } __attribute__((__packed__));
40
41 enum iscsi_discovery_parent_type {
42 @@ -841,7 +841,7 @@ struct iscsi_stats {
43 * up to ISCSI_STATS_CUSTOM_MAX
44 */
45 uint32_t custom_length;
46 - struct iscsi_stats_custom custom[0]
47 + struct iscsi_stats_custom custom[]
48 __attribute__ ((aligned (sizeof(uint64_t))));
49 };
50
51 @@ -972,7 +972,7 @@ struct iscsi_offload_host_stats {
52 * up to ISCSI_HOST_STATS_CUSTOM_MAX
53 */
54 uint32_t custom_length;
55 - struct iscsi_host_stats_custom custom[0]
56 + struct iscsi_host_stats_custom custom[]
57 __attribute__ ((aligned (sizeof(uint64_t))));
58 };
59
60 --
61 2.21.1
62