numam-dpdk/lib/librte_eal/windows
Dmitry Kozlyuk ff5db45d47 eal/windows: use bundled getopt with MinGW
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: 5e373e456e ("eal/windows: add getopt implementation")
Cc: stable@dpdk.org

Reported-by: Khoa To <khot@microsoft.com>
Reported-by: Tal Shnaiderman <talshn@nvidia.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Khoa To <khot@microsoft.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
2020-10-05 09:12:24 +02:00
..
include mem: drop mapping API workaround 2020-09-21 10:12:10 +02:00
eal_debug.c eal/windows: support exit and panic 2020-06-24 11:02:51 +02:00
eal_file.c eal/windows: implement basic memory management 2020-06-15 19:30:54 +02:00
eal_hugepages.c eal/windows: detect insufficient privileges for hugepages 2020-07-11 00:45:20 +02:00
eal_interrupts.c eal/windows: add stub for Rx interrupt control 2020-09-11 01:38:26 +02:00
eal_lcore.c eal/windows: improve CPU and NUMA node detection 2020-06-15 19:29:39 +02:00
eal_log.c eal/windows: support logging 2020-05-07 12:18:18 +02:00
eal_memalloc.c eal: move OS common config objects 2020-06-30 00:02:53 +02:00
eal_memory.c eal: move OS common config objects 2020-06-30 00:02:53 +02:00
eal_mp.c bus/pci: introduce Windows support with stubs 2020-06-30 00:02:54 +02:00
eal_thread.c eal: introduce thread init helper 2020-07-08 14:39:26 +02:00
eal_timer.c timer: support EAL functions on Windows 2020-06-23 19:03:30 +02:00
eal_windows.h eal/windows: implement basic memory management 2020-06-15 19:30:54 +02:00
eal.c eal/windows: probe vdev 2020-09-09 14:40:41 +02:00
fnmatch.c eal/windows: add fnmatch implementation 2020-05-07 12:18:17 +02:00
getopt.c eal/windows: use bundled getopt with MinGW 2020-10-05 09:12:24 +02:00
meson.build eal/windows: add stub for Rx interrupt control 2020-09-11 01:38:26 +02:00