mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-19 16:40:46 -09:00
Fixes:
https://autobuild.buildroot.net/results/902/9020e4fda8cbc4f9886d5e8725f6df8d99716241/
The build error does not occur with gcc-13.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit a042ea816a)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
From a90e39f896a2f1b76ad3c304b69c451ec92a687a Mon Sep 17 00:00:00 2001
|
|
From: Brahmajit Das <brahmajit.xyz@gmail.com>
|
|
Date: Mon, 12 Jun 2023 10:55:28 +0000
|
|
Subject: [PATCH] client.c: fix build w/ musl libc
|
|
|
|
Without the patch, I'm getting the following error:
|
|
|
|
client.c:47:2: error: call to undeclared library function 'strncpy' with type
|
|
'char *(char *, const char *, unsigned long)'; ISO C99 and later do not support implicit function declarations
|
|
[-Wimplicit-function-declaration]
|
|
strncpy(sun.sun_path, path, sizeof(sun.sun_path)-1);
|
|
^
|
|
client.c:47:2: note: include the header <string.h> or explicitly provide a declaration for 'strncpy'
|
|
client.c:60:19: error: call to undeclared library function 'memcmp' with type 'int
|
|
(const void *, const void *, unsigned long)'; ISO C99 and later do not support implicit function declarations
|
|
[-Wimplicit-function-declaration]
|
|
if (n >= 5 && !memcmp(buf + n - 5, "done\n", 5)) {
|
|
^
|
|
client.c:60:19: note: include the header <string.h> or explicitly provide a declaration for 'memcmp'
|
|
2 errors generated.
|
|
|
|
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
|
|
|
|
Upstream: https://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git/commit/?id=a90e39f896a2f1b76ad3c304b69c451ec92a687a
|
|
|
|
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
|
---
|
|
client.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/client.c b/client.c
|
|
index 883b1de..7119ed9 100644
|
|
--- a/client.c
|
|
+++ b/client.c
|
|
@@ -19,6 +19,7 @@
|
|
#include <sys/socket.h>
|
|
#include <sys/un.h>
|
|
#include <unistd.h>
|
|
+#include <string.h>
|
|
#include "mcelog.h"
|
|
#include "client.h"
|
|
#include "paths.h"
|