]> git.droids-corp.org - dpdk.git/commitdiff
test: fix build with gcc 10
authorTimothy Redaelli <tredaelli@redhat.com>
Wed, 5 Feb 2020 12:50:42 +0000 (13:50 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 4 Mar 2020 09:11:07 +0000 (10:11 +0100)
GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 08e0c7581468 ("test/fib: add performance autotests")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
app/test/test_fib_perf.c
app/test/test_lpm_perf.c

index 573087c3c0e1bcd68f8d274767901783ebd65a64..dd2e54db8bdbb0ac0c47e3ac9b66842465e6dab1 100644 (file)
@@ -35,7 +35,7 @@ struct route_rule {
        uint8_t depth;
 };
 
-struct route_rule large_route_table[MAX_RULE_NUM];
+static struct route_rule large_route_table[MAX_RULE_NUM];
 
 static uint32_t num_route_entries;
 #define NUM_ROUTE_ENTRIES num_route_entries
index a2578fe90e85d9e9bb7c320b21985304ac4a940b..489719c40b9ecf0ed60d477c3bca47605f7f9717 100644 (file)
@@ -34,7 +34,7 @@ struct route_rule {
        uint8_t depth;
 };
 
-struct route_rule large_route_table[MAX_RULE_NUM];
+static struct route_rule large_route_table[MAX_RULE_NUM];
 
 static uint32_t num_route_entries;
 #define NUM_ROUTE_ENTRIES num_route_entries