You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

62 lines
1.9 KiB

From d4ed4972df1ffe9381e33f2800f8e574f632948c Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Mon, 2 Mar 2020 15:21:30 -0800
Subject: [PATCH 1/1] iscsi_if.h replace zero-length array with flexible-array
member
---
include/iscsi_if.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/iscsi_if.h b/include/iscsi_if.h
index 2d46214..e8cee0d 100644
--- a/include/iscsi_if.h
+++ b/include/iscsi_if.h
@@ -337,7 +337,7 @@ enum iscsi_param_type {
struct iscsi_param_info {
uint32_t len; /* Actual length of the param value */
uint16_t param; /* iscsi param */
- uint8_t value[0]; /* length sized value follows */
+ uint8_t value[]; /* length sized value follows */
} __attribute__((__packed__));
struct iscsi_iface_param_info {
@@ -346,7 +346,7 @@ struct iscsi_iface_param_info {
uint16_t param; /* iscsi param value */
uint8_t iface_type; /* IPv4 or IPv6 */
uint8_t param_type; /* iscsi_param_type */
- uint8_t value[0]; /* length sized value follows */
+ uint8_t value[]; /* length sized value follows */
} __attribute__((__packed__));
/*
@@ -723,7 +723,7 @@ enum iscsi_flashnode_param {
struct iscsi_flashnode_param_info {
uint32_t len; /* Actual length of the param */
uint16_t param; /* iscsi param value */
- uint8_t value[0]; /* length sized value follows */
+ uint8_t value[]; /* length sized value follows */
} __attribute__((__packed__));
enum iscsi_discovery_parent_type {
@@ -841,7 +841,7 @@ struct iscsi_stats {
* up to ISCSI_STATS_CUSTOM_MAX
*/
uint32_t custom_length;
- struct iscsi_stats_custom custom[0]
+ struct iscsi_stats_custom custom[]
__attribute__ ((aligned (sizeof(uint64_t))));
};
@@ -972,7 +972,7 @@ struct iscsi_offload_host_stats {
* up to ISCSI_HOST_STATS_CUSTOM_MAX
*/
uint32_t custom_length;
- struct iscsi_host_stats_custom custom[0]
+ struct iscsi_host_stats_custom custom[]
__attribute__ ((aligned (sizeof(uint64_t))));
};
--
2.21.1