From ad4a9b2a0b6b5ae276e7287ebd1922b61e07cf94 Mon Sep 17 00:00:00 2001 From: rageoholic Date: Mon, 23 Nov 2020 00:38:01 -0600 Subject: [PATCH] Fix error building on Clang on windows Clang apparently doesn't implement strdup in the version of libc they ship. Instead they implement _strdup which is identical. This change just makes it so that on windows we just call _strdup in yaml_strdup. --- src/api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api.c b/src/api.c index 16f88bd7..030e681c 100644 --- a/src/api.c +++ b/src/api.c @@ -63,7 +63,11 @@ yaml_strdup(const yaml_char_t *str) if (!str) return NULL; +#ifdef _MSC_VER return (yaml_char_t *)strdup((char *)str); +#else + return (yaml_char_t *)strdup((char *)str); +#endif } /*