net/mlx5: fix build with zero-size array
authorXiaoyu Min <jackmin@mellanox.com>
Mon, 15 Oct 2018 01:45:23 +0000 (01:45 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 18 Oct 2018 08:24:39 +0000 (10:24 +0200)
commit0eef26d073ea65d966cd512303c30ea7ca924e1d
treefabf7fb80f52c9f9486b8817bb9378df098c6379
parent31fda5187761f31bf280f72cdff63a5f1669afc8
net/mlx5: fix build with zero-size array

If the build environment doesn't have 'linux/tc_act/tc_pedit.h' header,
compiler will use needed structs defined in mlx5_flow_tcf.c.

However, there is a zero-size array defined in one struct and
ISO C forbids this when -Wpedantic is set by debug mode.

Simply put __extension__ keyword before the struct in question.

Fixes: 2ed2fe5f0a9c ("net/mlx5: rewrite IP address UDP/TCP port by E-Switch")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
drivers/net/mlx5/mlx5_flow_tcf.c