From 7720c4aefa95ee9df6e5d464c187efa7141f1302 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 4 Sep 2020 20:09:28 +0300 Subject: android: jpeg: exif: Use reentrant localtime_r() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The std::localtime() function isn't thread-safe, and we have no guarantee whether other threads in the camera service may or may not call it. Replace it with localtime_r(). This requires switching from ctime to time.h, as there is no std::localtime_r() function. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Niklas Söderlund --- src/android/jpeg/exif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/android/jpeg/exif.h') diff --git a/src/android/jpeg/exif.h b/src/android/jpeg/exif.h index 622de4cf..f04cefce 100644 --- a/src/android/jpeg/exif.h +++ b/src/android/jpeg/exif.h @@ -7,8 +7,8 @@ #ifndef __ANDROID_JPEG_EXIF_H__ #define __ANDROID_JPEG_EXIF_H__ -#include #include +#include #include -- cgit v1.2.1