summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran├žois Revol <revol@free.fr>2013-12-07 01:10:57 +0100
committerFran├žois Revol <revol@free.fr>2013-12-07 01:16:22 +0100
commitd6561e51e0540302537a5101485726c5c37894d8 (patch)
treeaa3182548dd540de68315ee883e10fd0ca3bd2ab
parent850432f9900f9e2130f522bf19483c111b49e9e8 (diff)
downloadnetsurf-d6561e51e0540302537a5101485726c5c37894d8.tar.gz
netsurf-d6561e51e0540302537a5101485726c5c37894d8.tar.bz2
Fix for gcc2 flexible array declaration
-rw-r--r--desktop/treeview.c2
-rw-r--r--utils/bloom.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 0681b95ec..a137c46c5 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -96,7 +96,7 @@ struct treeview_node {
struct treeview_node_entry {
treeview_node base;
- struct treeview_field fields[];
+ struct treeview_field fields[FLEX_ARRAY_LEN_DECL];
}; /**< Entry class inherits node base class */
struct treeview_pos {
diff --git a/utils/bloom.c b/utils/bloom.c
index 1b07d6f1b..df9e76e1c 100644
--- a/utils/bloom.c
+++ b/utils/bloom.c
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include "utils/bloom.h"
+#include "utils/utils.h"
/**
* Hash a string, returning a 32bit value. The hash algorithm used is
@@ -50,7 +51,7 @@ static inline uint32_t fnv(const char *datum, size_t len)
struct bloom_filter {
size_t size;
uint32_t items;
- uint8_t filter[];
+ uint8_t filter[FLEX_ARRAY_LEN_DECL];
};
struct bloom_filter *bloom_create(size_t size)