Skip to contentSkip to conversation

efitools: Include <strings.h> for the strcasecmp function

PATCH In review Florian Weimer 2 participants 2 messages Dec 14, 2022 EFI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efitools: Include <strings.h> for the strcasecmp function

Otherwise, an implicit function declaration is the result, and the code may fail to compile with future compilers.

---
 efi-updatevar.c | 1 +
 1 file changed, 1 insertion(+)
efi-updatevar.c +1 -0
index 4247105..033d938 100644
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>

Related to:

<https://fedoraproject.org/wiki/Changes/PortingToModernC>
<https://fedoraproject.org/wiki/Toolchain/PortingToModernC>

#1 lore raw

[+cc James]

Quoted 6 lines · Florian Weimer

Otherwise, an implicit function declaration is the result, and the code may fail to compile with future compilers.

---
 efi-updatevar.c | 1 +
 1 file changed, 1 insertion(+)

efitools appears to be maintained by James, so you may want to cc your submissions to him.

Your patches are missing a DCO, yet existing commits in the efitools repository have one. You may want to respin with your Signed-off-by added.

Thanks,

Lukas

Quoted 19 lines
efi-updatevar.c +1 -0
index 4247105..033d938 100644
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>

Related to:

<https://fedoraproject.org/wiki/Changes/PortingToModernC>
<https://fedoraproject.org/wiki/Toolchain/PortingToModernC>