Index: src/framework/mlt_property.c
--- src/framework/mlt_property.c.orig
+++ src/framework/mlt_property.c
@@ -567,8 +567,10 @@ static double mlt_property_atof(mlt_property self, dou
             // Protect damaging the global locale from a temporary locale on another thread.
             pthread_mutex_lock(&self->mutex);
 
+#ifdef NEED_LOCALE_SAVE_RESTORE
             // Get the current locale
             orig_localename = strdup(setlocale(LC_NUMERIC, NULL));
+#endif
 
             // Set the new locale
             setlocale(LC_NUMERIC, locale);
@@ -1122,8 +1124,10 @@ char *mlt_property_get_time(mlt_property self,
         // Protect damaging the global locale from a temporary locale on another thread.
         pthread_mutex_lock(&self->mutex);
 
+#ifdef NEED_LOCALE_SAVE_RESTORE
         // Get the current locale
         orig_localename = strdup(setlocale(LC_NUMERIC, NULL));
+#endif
 
         // Set the new locale
         setlocale(LC_NUMERIC, localename);
@@ -1202,8 +1206,10 @@ int mlt_property_is_numeric(mlt_property self, mlt_loc
             // Protect damaging the global locale from a temporary locale on another thread.
             pthread_mutex_lock(&self->mutex);
 
+#ifdef NEED_LOCALE_SAVE_RESTORE
             // Get the current locale
             orig_localename = strdup(setlocale(LC_NUMERIC, NULL));
+#endif
 
             // Set the new locale
             setlocale(LC_NUMERIC, locale);
