> > 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: sta...@dpdk.org > > > > Signed-off-by: Dmitry Kozlyuk <dmitry.kozl...@gmail.com> > > Reported-by: Khoa To <k...@microsoft.com> > > Reported-by: Tal Shnaiderman <tal...@nvidia.com> > > --- > > > > This patch probably supesedes > > https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatch > > work.dpdk.org%2Fpatch%2F78574%2F&data=02%7C01%7Ckhot%40micr > > osoft.com%7C7f6e47a7db0945b2c93708d860dffaa3%7C72f988bf86f141af91a > > b2d7cd011db47%7C1%7C0%7C637365862839491238&sdata=%2BQPJ2US > > hknxQLV97rQRVc0sT55TpTNjNTq1m9oj9eFs%3D&reserved=0. > > Acked-by: Khoa To <k...@microsoft.com>
Applied, thanks