libcamera: utils: Avoid infinite recursion with strtod()
When the C library doesn't provide local object support, the utils::strtod() function simply calls strtod() from the C library. The current implementation does so incorrectly, and calls utils::strtod() instead, resulting in infinite recursion. Fix it with a proper namespace qualifier. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
This commit is contained in:
@@ -517,7 +517,7 @@ double strtod(const char *__restrict nptr, char **__restrict endptr)
|
||||
* If the libc implementation doesn't provide locale object support,
|
||||
* assume that strtod() is locale-independent.
|
||||
*/
|
||||
return strtod(nptr, endptr);
|
||||
return ::strtod(nptr, endptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user