[Libguestfs] [libnbd PATCH v3 03/29] socket activation: rename sa_(tmpdir|sockpath) to sact_(tmpdir|sockpath)

Eric Blake eblake at redhat.com
Wed Feb 15 20:00:44 UTC 2023


On Wed, Feb 15, 2023 at 03:11:32PM +0100, Laszlo Ersek wrote:
> <signal.h> in POSIX reserves the "sa_" prefix:
> 
> https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02
> 
> Let's use "sact_" instead.
> 
> Signed-off-by: Laszlo Ersek <lersek at redhat.com>
> ---
>  lib/internal.h                               |  4 ++--
>  generator/states-connect-socket-activation.c | 16 ++++++++--------
>  lib/handle.c                                 | 12 ++++++------
>  3 files changed, 16 insertions(+), 16 deletions(-)

Reviewed-by: Eric Blake <eblake at redhat.com>

Stepping on reserved names is something that you can often get away
with (if you don't conflict now, how likely is it that libc will
actually introduce a future symbol that will conflict later?), so this
is change is more on the theoretical side.  But I have no objections,
and as you proved, it's a very easy mechanical fix once we even bother
to identify that reserved name clashes could be a potential porting
issue.  I've probably spent more time writing this email than you did
in creating the patch proper (if you exclude the subsequent time
testing that it builds and passes 'make check-valgrind'...)

Reviewed-by: Eric Blake <eblake at redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


More information about the Libguestfs mailing list