helpers: Implement strndup() for MinGW

Provide strndup implementation if compiled with MinGW because
it is a POSIX only method

Signed-off-by: Miklós Márton <martonmiklosqdev@gmail.com>
Change-Id: If418080bffff1f5961cacf2a300ea9c666682458
Reviewed-on: https://review.coreboot.org/c/flashrom/+/34621
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2 files changed