summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2015-07-15 13:40:42 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-07-16 16:48:51 +0200
commit6f71544ce28f09e9aae452954b3b72c448aad2ec (patch)
tree9dff29c692238302ec8c3246cccb118c4d2423ad
parent2a4103eba929e67e0f0eb9dc808da26377fe2665 (diff)
downloaddpdk-6f71544ce28f09e9aae452954b3b72c448aad2ec.zip
dpdk-6f71544ce28f09e9aae452954b3b72c448aad2ec.tar.gz
dpdk-6f71544ce28f09e9aae452954b3b72c448aad2ec.tar.xz
hash: fix build with gcc 4.4 and 4.5
gcc 4.4 and 4.5 throws following error: rte_cuckoo_hash.c:145: error: flexible array member in otherwise empty struct. This is due to empty length in flexible array, which has been changed to use size 0 in the declaration of the array. Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation") Reported-by: Olga Shern <olgas@mellanox.com> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
-rw-r--r--lib/librte_hash/rte_cuckoo_hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 105ecdb..00ba3a3 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -142,7 +142,7 @@ struct rte_hash_key {
void *pdata;
};
/* Variable key size */
- char key[];
+ char key[0];
} __attribute__((aligned(KEY_ALIGNMENT)));
/** Bucket structure */