Skip to content

Conversation

N-R-K
Copy link
Contributor

@N-R-K N-R-K commented Mar 17, 2025

No description provided.

@N-R-K
Copy link
Contributor Author

N-R-K commented Mar 17, 2025

This also looks very fishy

openrc/meson.build

Lines 184 to 186 in 028eade

if cc.has_function('strlcpy', prefix: '#define _GNU_SOURCE\n#include <string.h>')
add_project_arguments('-DHAVE_STRLCPY', language: 'c')
endif

It's testing with _GNU_SOURCE defined but doesn't add it to project args...

EDIT: pushed a commit addressing this too.

@N-R-K N-R-K force-pushed the gnu-source-cleanup branch from 4ac3067 to 3da9257 Compare March 17, 2025 00:24
@N-R-K N-R-K changed the title some _GNU_SOURCE related cleanups build: _GNU_SOURCE related cleanups Mar 17, 2025
@N-R-K N-R-K force-pushed the gnu-source-cleanup branch from 3da9257 to 15f86b8 Compare March 17, 2025 03:33
N-R-K added 5 commits March 18, 2025 23:07
b6fef59 added it along with libgen.h include, presuably to get
the glibc specific basename() definition. but even that commit
never really used that function and used basename_c() instead.
so this was always unnecessary. the libgen.h include was also
removed in c80d6bb.
pipe2 is already used unconditionally in start-stop-deamon for
quite some time now and is already available on all platforms
OpenRC supports.

Ref: OpenRC#626
the current code checks for strlcpy with _GNU_SOURCE defined but
never adds it to project arguments. check for it without
_GNU_SOURCE first and try again with _GNU_SOURCE after.
currently _GNU_SOURCE might get duplicated a bunch of times.
it's harmless, but could lead to an unecessarily noisy command
line invocation.
@N-R-K N-R-K force-pushed the gnu-source-cleanup branch from 15f86b8 to 23bd993 Compare March 18, 2025 23:07
@navi-desu navi-desu merged commit c544b9e into OpenRC:master Mar 22, 2025
5 checks passed
@N-R-K N-R-K deleted the gnu-source-cleanup branch March 22, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants