diff --git a/src/hb-common.cc b/src/hb-common.cc index 1484bbb2e..a37154579 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -219,7 +219,7 @@ struct hb_language_item_t { } inline hb_language_item_t & operator = (const char *s) { - lang = (hb_language_t) _strdup (s); + lang = (hb_language_t) strdup (s); for (unsigned char *p = (unsigned char *) lang; *p; p++) *p = canon_map[*p]; diff --git a/src/hb-private.hh b/src/hb-private.hh index 45afc20b1..996d88d29 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -132,6 +132,9 @@ static int errno = 0; /* Use something better? */ # endif # if defined(_MSC_VER) && _MSC_VER < 1900 # define snprintf _snprintf +# elif defined(_MSC_VER) && _MSC_VER >= 1900 +# /* Covers VC++ Error for strdup being a deprected POSIX name and to instead use _strdup instead */ +# define strdup _strdup # endif #endif