eal/windows: fix build with MinGW-w64 8
authorDmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tue, 1 Dec 2020 16:39:58 +0000 (19:39 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 7 Dec 2020 13:00:22 +0000 (14:00 +0100)
commit93bf432dd58236235e8a930a108dbcaee81fc5fc
treef94abf43398c472bd03881523b7b443e370e3664
parentd3fa7b89f0b893f051cb4cef1cbc961cb59f5721
eal/windows: fix build with MinGW-w64 8

MinGW-w64 above 8.0.0 exposes VirtualAlloc2() API in headers, but lacks
it in import libraries. Hence, availability of this API at compile-time
can't be used to choose between locating VirtualAlloc2() manually or
relying on the dynamic linker.

Fix redefinition compile-time errors.
Always link VirtualAlloc2() when using GCC.

Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
Cc: stable@dpdk.org
Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
lib/librte_eal/windows/eal_memory.c