[Letux-kernel] [PATCH letux] modpost: fix compile
Andreas Kemnade
andreas at kemnade.info
Fri Sep 19 21:15:11 CEST 2025
Fix this error:
HOSTCC scripts/mod/modpost.o
scripts/mod/modpost.c:32:14: error: static declaration of 'strchrnul' follows non-static declaration
32 | static char *strchrnul(const char *s, int c)
| ^
/usr/include/string.h:286:14: note: previous declaration is here
286 | extern char *strchrnul (const char *__s, int __c)
| ^
Signed-off-by: Andreas Kemnade <andreas at kemnade.info>
---
scripts/mod/modpost.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index ed60b88c9a817..01b5a923f4638 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -29,6 +29,7 @@
#include "../../include/linux/license.h"
/* define our local strchrnul, it is not available everywhere */
+#define strchrnul strchrnul_ours
static char *strchrnul(const char *s, int c)
{
while (*s && *s != (char)c)
--
2.47.2
More information about the Letux-kernel
mailing list