[dpdk-dev] [PATCH] eal/windows: use bundled getopt with MinGW

Kadam, Pallavi pallavi.kadam at intel.com
Mon Sep 28 21:53:51 CEST 2020


On 9/24/2020 4:17 PM, Dmitry Kozlyuk wrote:
> Clang builds use getopt.c in librte_eal while MinGW provides
> implementation as part of the toolchain. Statically linking librte_eal
> to an application that depends on getopt results in undefined reference
> errors with MinGW. There are no such errors with Clang, because with
> Clang librte_eal actually defines getopt functions.
>
> Use getopt.c in EAL with Clang and MinGW to get identical behavior.
> Adjust code for MinGW. Incidentally, this removes a bug when free() is
> called on uninitialized memory.
>
> Fixes: 5e373e456e6 ("eal/windows: add getopt implementation")
> Cc: stable at dpdk.org
>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
> Reported-by: Khoa To <khot at microsoft.com>
> Reported-by: Tal Shnaiderman <talshn at nvidia.com>
Acked-by: Pallavi Kadam <pallavi.kadam at intel.com 
<mailto:pallavi.kadam at intel.com>>


More information about the dev mailing list