diff --git a/compat/strtod.c b/compat/strtod.c
index 856866564caa0e8a4208661898fba11e010c8ebc..3a9452eac2bf34ae26d5db3407bb522c28adaa4d 100644
--- a/compat/strtod.c
+++ b/compat/strtod.c
@@ -48,7 +48,7 @@ double avpriv_strtod(const char *nptr, char **endptr)
     double res;
 
     /* Skip leading spaces */
-    while (isspace(*nptr))
+    while (av_isspace(*nptr))
         nptr++;
 
     if (!av_strncasecmp(nptr, "infinity", 8)) {