]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(st): add missing string.h include
authorYann Gautier <yann.gautier@foss.st.com>
Mon, 3 Oct 2022 07:30:34 +0000 (09:30 +0200)
committerYann Gautier <yann.gautier@st.com>
Mon, 3 Oct 2022 08:00:03 +0000 (10:00 +0200)
Since patch on libc refactoring, there is a compilation error with
STM32MP_USB_PROGRAMMER=1:
plat/st/common/stm32cubeprogrammer_usb.c:81:35: error:
 implicit declaration of function 'strnlen'
 [-Werror=implicit-function-declaration]
      length += strnlen((char *)&dfu->buffer[GET_PHASE_LEN],

The string.h header file should be included.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I1fbb2d9714cbc0d0640cb5e3c5ae8201dbfbe14e

plat/st/common/stm32cubeprogrammer_usb.c

index 19a6bbae8d35cf3548a11c0f5c47e607b930cb52..75e80385994923acf682a1c51fd6af39c39b2830 100644 (file)
@@ -1,11 +1,12 @@
 /*
- * Copyright (c) 2021, STMicroelectronics - All Rights Reserved
+ * Copyright (c) 2021-2022, STMicroelectronics - All Rights Reserved
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
 #include <assert.h>
 #include <errno.h>
+#include <string.h>
 
 #include <tools_share/firmware_image_package.h>