{"thread":{"id":"63135","subject":"[PATCH 05/12] config.mak.uname: add a note about NO_STRLCPY for Linux","startedAt":"2025-03-15T02:50:30Z","lastAt":"2025-03-15T02:50:30Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":12},"messages":[{"id":"514348","messageId":"a3dbc1df-61e4-4216-96c8-3414d68b82e9@ramsayjones.plus.com","threadId":"63135","inReplyTo":null,"subject":"[PATCH 05/12] config.mak.uname: add a note about NO_STRLCPY for Linux","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2025-03-15T02:47:27Z","receivedAt":"2025-03-15T02:50:30Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nCommit 817151e61a (\"Rename safe_strncpy() to strlcpy().\", 2006-06-24)\nadded the NO_STRLCPY make variable to allow the conditional use of\nthe gitstrlcpy() compat function on those platforms which didn't\nprovide the 'standard' strlcpy() function.\n\nRecently, in the summer of 2023, the strlcpy() and strlcat() functions\nwere added to the glibc library (v2.38), so some of the more up-to-date\nLinux distributions no longer need to set NO_STRLCPY. For example, both\nUbuntu 24.04 LTS and RHEL 10 beta have glibc v2.39. However, several\ndistributions, which are still within their support window, have an\nearlier version and must still use the 'compat' version of strlcpy().\n\nIf the meson or autoconf build systems are used on newer platforms, then\nthey will be configured to to use strlcpy() from glibc, whereas the make\nbuild will always choose the 'compat' function instead. Add a note to\nthe config.mak.uname file, in the Linux section, to prompt make users to\noverride NO_STRLCPY in the config.mak file, if appropriate.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n config.mak.uname | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 88007c4f13..ae6ba15586 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -48,6 +48,7 @@ ifeq ($(uname_S),OSF1)\n endif\n ifeq ($(uname_S),Linux)\n \tHAVE_ALLOCA_H = YesPlease\n+\t# override in config.mak if you have glibc >= 2.38\n \tNO_STRLCPY = YesPlease\n \tHAVE_PATHS_H = YesPlease\n \tLIBC_CONTAINS_LIBINTL = YesPlease\n-- \n2.49.0\n"}]}