net/mlx5: do not define static assert in Windows
authorOphir Munk <ophirmu@nvidia.com>
Mon, 28 Dec 2020 09:54:11 +0000 (11:54 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:07 +0000 (16:03 +0100)
commitffe262d675fdc43973bf61d94f610d9aabd53403
treec73e7309fa92bf30db55b6907210fd17684e4834
parentbd4a263560319a9814881ebb11488565bc7edf5e
net/mlx5: do not define static assert in Windows

In Linux 'static_assert' is defined in file mlx5_defs.h:

 #ifndef HAVE_STATIC_ASSERT
    #define static_assert _Static_assert
 #endif

The same definition can originate from Linux file /usr/include/assert.h.

In Windows static_assert is used while _Static_assert is unknown.
Therefore update the definition condition to be:

 #if !defined(HAVE_STATIC_ASSERT) && !defined(RTE_EXEC_ENV_WINDOWS)
    #define static_assert _Static_assert
 #endif

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_defs.h