main: Fix build with MSVC

Use pkgconf_strndup() since strndup() might be unavailable
feature/tap-sh
Seungha Yang 2019-05-11 01:15:24 +09:00
parent be6011222b
commit 5436558eb8
1 changed files with 1 additions and 1 deletions

View File

@ -758,7 +758,7 @@ deduce_personality(char *argv[])
if (i == NULL)
return pkgconf_cross_personality_default();
prefix = strndup(argv0, i - argv0);
prefix = pkgconf_strndup(argv0, i - argv0);
out = pkgconf_cross_personality_find(prefix);
free(prefix);
if (out == NULL)