Skip to contentSkip to conversation

backports: add header file for function memcmp

PATCH In review Winnie Chang 2 participants 2 messages Aug 22, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 backports: add header file for function memcmp

Function memcmp is implicit declaration on kernel 4.9.88 ARM platform. backport-include/keys/asymmetric-type.h uses function memcmp but its caller compat/verification/verify.c and all its related header files do not include string.h. The header file is usually included from arch/arm/include/asm, but in this configuration, it doesn't. We need to be safe and insure string.h is there.

---
 backport/backport-include/keys/asymmetric-type.h | 2 ++
 1 file changed, 2 insertions(+)
backport/backport-include/keys/asymmetric-type.h +2 -0
index ee9c418..5744de9 100644
@@ -2,6 +2,8 @@
 #define __BP_ASYMMETRIC_TYPE_H
 #ifdef CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION
 
+#include <linux/string.h>
+
 struct asymmetric_key_id {
 	unsigned short	len;
 	unsigned char	data[];
Signature · 4 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#1 lore raw
Quoted 6 lines · Winnie Chang

Function memcmp is implicit declaration on kernel 4.9.88 ARM platform. backport-include/keys/asymmetric-type.h uses function memcmp but its caller compat/verification/verify.c and all its related header files do not include string.h. The header file is usually included from arch/arm/include/asm, but in this configuration, it doesn't. We need to be safe and insure string.h is there.

Makes sense, thanks!

johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in