From 18796375054498bba8a85def2f42876586fc4b8f Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Fri, 5 Dec 2025 21:33:25 +0000 Subject: [PATCH] tools/sd-notify.h: Include string.h too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alpine Linux, when using --enable-systemd to get the init files, fails with: tools/include/xen-sd-notify.h:69:3: error: call to undeclared library function 'memcpy' with type 'void *(void *, const void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 69 | memcpy(socket_addr.sun.sun_path, socket_path, path_length); | ^ This will be down to using musl rather than glibc. Include the appropriate header. Fixes: 78510f3a1522 ("tools: Import stand-alone sd_notify() implementation from systemd") Reported-by: Marek Marczykowski-Górecki Signed-off-by: Andrew Cooper Reviewed-by: Marek Marczykowski-Górecki Acked-by: Anthony PERARD (cherry picked from commit 8efff5a69ab7596f6c63031d0aef292114948cd9) --- tools/include/xen-sd-notify.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/xen-sd-notify.h b/tools/include/xen-sd-notify.h index 28c9b20f15..20441d0ec9 100644 --- a/tools/include/xen-sd-notify.h +++ b/tools/include/xen-sd-notify.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include