All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Julien Grall" <julien@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: [PATCH] tools/sd-notify.h: Include string.h too
Date: Sat, 6 Dec 2025 03:40:34 +0100	[thread overview]
Message-ID: <aTOXogSld6LTStIn@mail-itl> (raw)
In-Reply-To: <20251205220012.1976435-1-andrew.cooper3@citrix.com>

[-- Attachment #1: Type: text/plain, Size: 2153 bytes --]

On Fri, Dec 05, 2025 at 10:00:12PM +0000, Andrew Cooper wrote:
> 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 <marmarek@invisiblethingslab.com>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>

And also, this works:
https://gitlab.com/xen-project/people/marmarek/xen/-/pipelines/2199305972

> ---
> CC: Anthony PERARD <anthony.perard@vates.tech>
> CC: Michal Orzel <michal.orzel@amd.com>
> CC: Jan Beulich <jbeulich@suse.com>
> CC: Julien Grall <julien@xen.org>
> CC: Roger Pau Monné <roger.pau@citrix.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> 
> Example failure:
>   https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/12336994239
> ---
>  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 28c9b20f152d..20441d0ec9b8 100644
> --- a/tools/include/xen-sd-notify.h
> +++ b/tools/include/xen-sd-notify.h
> @@ -20,6 +20,7 @@
>  #include <errno.h>
>  #include <stddef.h>
>  #include <stdlib.h>
> +#include <string.h>
>  #include <sys/socket.h>
>  #include <sys/un.h>
>  #include <unistd.h>
> 
> base-commit: d430c0a66e102fb12baeec6a178c20da7864d5b5
> prerequisite-patch-id: 3db642dd7c06f6988283444c764cd646982775bb
> -- 
> 2.39.5
> 

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2025-12-06  2:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05 22:00 [PATCH] tools/sd-notify.h: Include string.h too Andrew Cooper
2025-12-06  2:40 ` Marek Marczykowski-Górecki [this message]
2025-12-10 14:54 ` Anthony PERARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aTOXogSld6LTStIn@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.