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:
Laurent Pinchart
2024-05-03 17:58:43 +03:00
parent 7235248d38
commit e0318c4776
+1 -1
View File
@@ -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
}