diff --git a/media/gpu/v4l2/mt21/mt21_decompressor.cc b/media/gpu/v4l2/mt21/mt21_decompressor.cc index a7f83857102aa..eb87e26d37c52 100644 --- a/media/gpu/v4l2/mt21/mt21_decompressor.cc +++ b/media/gpu/v4l2/mt21/mt21_decompressor.cc @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/390223051): Remove C-library calls to fix the errors. +#pragma allow_unsafe_libc_calls +#endif + #include "media/gpu/v4l2/mt21/mt21_decompressor.h" #include <sched.h> diff --git a/media/gpu/v4l2/mt21/mt21_decompressor_unittest.cc b/media/gpu/v4l2/mt21/mt21_decompressor_unittest.cc index 5ba6b9802ec59..62ce42403acc2 100644 --- a/media/gpu/v4l2/mt21/mt21_decompressor_unittest.cc +++ b/media/gpu/v4l2/mt21/mt21_decompressor_unittest.cc @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/390223051): Remove C-library calls to fix the errors. +#pragma allow_unsafe_libc_calls +#endif + #include "build/build_config.h" #if BUILDFLAG(IS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) && \ diff --git a/media/gpu/v4l2/mt21/mt21_util.h b/media/gpu/v4l2/mt21/mt21_util.h index 47d8480ca57df..53073752e4468 100644 --- a/media/gpu/v4l2/mt21/mt21_util.h +++ b/media/gpu/v4l2/mt21/mt21_util.h @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/390223051): Remove C-library calls to fix the errors. +#pragma allow_unsafe_libc_calls +#endif + #ifndef MEDIA_GPU_V4L2_MT21_MT21_UTIL_H_ #define MEDIA_GPU_V4L2_MT21_MT21_UTIL_H_ diff --git a/media/gpu/v4l2/mt21/mt21_util_unittest.cc b/media/gpu/v4l2/mt21/mt21_util_unittest.cc index 800fd8039c4ab..bbd43d6f066d6 100644 --- a/media/gpu/v4l2/mt21/mt21_util_unittest.cc +++ b/media/gpu/v4l2/mt21/mt21_util_unittest.cc @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/390223051): Remove C-library calls to fix the errors. +#pragma allow_unsafe_libc_calls +#endif + #include "build/build_config.h" #if BUILDFLAG(IS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) && \ diff --git a/media/gpu/v4l2/v4l2_framerate_control.cc b/media/gpu/v4l2/v4l2_framerate_control.cc index 583b27a056548..cddddb6662939 100644 --- a/media/gpu/v4l2/v4l2_framerate_control.cc +++ b/media/gpu/v4l2/v4l2_framerate_control.cc @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/390223051): Remove C-library calls to fix the errors. +#pragma allow_unsafe_libc_calls +#endif + #include "media/gpu/v4l2/v4l2_framerate_control.h" #include <linux/videodev2.h> diff --git a/media/gpu/v4l2/v4l2_jpeg_encode_accelerator.cc b/media/gpu/v4l2/v4l2_jpeg_encode_accelerator.cc index 8ade5ab42816f..93c5b7a66c37d 100644 --- a/media/gpu/v4l2/v4l2_jpeg_encode_accelerator.cc +++ b/media/gpu/v4l2/v4l2_jpeg_encode_accelerator.cc @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/390223051): Remove C-library calls to fix the errors. +#pragma allow_unsafe_libc_calls +#endif + #include "media/gpu/v4l2/v4l2_jpeg_encode_accelerator.h" #include <errno.h> diff --git a/media/gpu/v4l2/v4l2_unittest.cc b/media/gpu/v4l2/v4l2_unittest.cc index cc668cca455eb..fd1db41f459b9 100644 --- a/media/gpu/v4l2/v4l2_unittest.cc +++ b/media/gpu/v4l2/v4l2_unittest.cc @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/390223051): Remove C-library calls to fix the errors. +#pragma allow_unsafe_libc_calls +#endif + #include <drm.h> #include <fcntl.h> #include <gbm.h> diff --git a/media/gpu/v4l2/v4l2_video_decoder.cc b/media/gpu/v4l2/v4l2_video_decoder.cc index 73ba13c3d64e0..8fa928e8ff6cb 100644 --- a/media/gpu/v4l2/v4l2_video_decoder.cc +++ b/media/gpu/v4l2/v4l2_video_decoder.cc @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/390223051): Remove C-library calls to fix the errors. +#pragma allow_unsafe_libc_calls +#endif + #include "media/gpu/v4l2/v4l2_video_decoder.h" #include <drm_fourcc.h> diff --git a/media/gpu/v4l2/v4l2_video_encode_accelerator.cc b/media/gpu/v4l2/v4l2_video_encode_accelerator.cc index ea5c463e521e0..b1c62dffa0a4b 100644 --- a/media/gpu/v4l2/v4l2_video_encode_accelerator.cc +++ b/media/gpu/v4l2/v4l2_video_encode_accelerator.cc @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/390223051): Remove C-library calls to fix the errors. +#pragma allow_unsafe_libc_calls +#endif + #include "media/gpu/v4l2/v4l2_video_encode_accelerator.h" #include <fcntl.h>