mirror of
https://github.com/json-c/json-c.git
synced 2026-04-04 21:09:06 +08:00
Issue #668: add the option to specify "cmake -DUSELOCALE_NEEDS_FREELOCALE=1" to work around a bug in older versions of FreeBSD (<12.4).
This commit is contained in:
@@ -344,6 +344,11 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *
|
||||
freelocale(duploc);
|
||||
return NULL;
|
||||
}
|
||||
#ifdef NEWLOCALE_NEEDS_FREELOCALE
|
||||
// Older versions of FreeBSD (<12.4) don't free the locale
|
||||
// passed to newlocale(), so do it here
|
||||
freelocale(duploc);
|
||||
#endif
|
||||
uselocale(newloc);
|
||||
}
|
||||
#elif defined(HAVE_SETLOCALE)
|
||||
|
||||
Reference in New Issue
Block a user