]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/commonio.[ch]: struct commonio_ops: Add prefix 'cio_' to structure members
authorAlejandro Colomar <alx@kernel.org>
Sat, 9 Aug 2025 18:38:24 +0000 (20:38 +0200)
committerSerge Hallyn <serge@hallyn.com>
Sat, 18 Oct 2025 17:41:23 +0000 (12:41 -0500)
commitdb2a06ec2411a57c201e618e8cd3c2a6fcd91ee3
tree6ec0f836a96203d5e15efc23d93b903f7e9e544e
parentc80d2cc226bbaa25dd80a77d91d91c1c950eaac8
lib/commonio.[ch]: struct commonio_ops: Add prefix 'cio_' to structure members

This structure has members that are named like libc APIs.

libc is allowed to provide any functions as macros (7.1.4p1 in C23).

This means that libc is allowed to provide a free(3) macro, which could
look like

#define free(p)  __free(p)

And that would be expanded by the preprocessor in our code, turning our
structure members into some code that won't work (or even worse, it
might misbehave).

So, fix this undefined behavior.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/commonio.c
lib/commonio.h