Skip to contentSkip to conversation

configure: Add _GNU_SOURCE to strlcpy configure test

PATCH Applied Sam James 2 participants 2 messages Dec 2, 2023 – Dec 6, 2023

Subsystems (2)
lore
Share & tools
lore

Sam James

author
#0 lore raw

PATCH 1/1 configure: Add _GNU_SOURCE to strlcpy configure test

Quoted 1 line

=glibc-2.38 adds strlcpy but it's guarded under a feature-test macro. Just

add _GNU_SOURCE to the configure test because we already pass _GNU_SOURCE unconditionally in the Makefiles when building iproute2.

---
 configure | 1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index eb689341..78bc52c0 100755
@@ -445,6 +445,7 @@ EOF
 check_strlcpy()
 {
     cat >$TMPDIR/strtest.c <<EOF
+#define _GNU_SOURCE
 #include <string.h>
 int main(int argc, char **argv) {
 	char dst[10];
Signature · 1 line
2.43.0
#1 lore raw
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Quoted 8 lines · On Sat, 2 Dec 2023 02:47:04 +0000 you wrote:
Quoted 1 line

=glibc-2.38 adds strlcpy but it's guarded under a feature-test macro. Just

add _GNU_SOURCE to the configure test because we already pass _GNU_SOURCE unconditionally in the Makefiles when building iproute2.

---
 configure | 1 +
 1 file changed, 1 insertion(+)

Here is the summary with links:
- [iproute2] configure: Add _GNU_SOURCE to strlcpy configure test

    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=0a24c18d30f4

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html