-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not export strlcat or strcpy in shared libraries #91
Comments
Thanks for reporting this. I wasn't aware that glibc has started to support The only way to "fix" this would be to rename the function. We need to export it because it's used by libmultipath. What problem exactly do you see? There are only very few programs that link to libmpathutil, and most of them are part of multipath-tools itself. Actually all I can think of is Can you provide a reference for your assertion that 'function names beggining with "str" are reserved to libc'? |
I wish i could make the rules.. https://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html post-ed: I forgot, strlcpy/strlcat were added to the next revision of POSIX Issue 8 published on 14 June 2024. |
Alright, thanks. We'll rename the function, then. |
We don't comply with this spec at all though. In particular, we use lots of identifiers starting with underscores. I've actually been aware of this for some time, but up to now resolved to ignoring it :-/ |
Just for confirmation, AFAIU you aren't aware of any real problems arising from our exporting of |
Well.. there may be a symbol clash/ambiguity which one to call ..now the gibc version is a weak symbol so YOUR version wins. no idea about musl thou. |
IMO our version would win anyway. Because of |
multipath-tools/libmpathutil/util.h
Line 24 in efa6a26
Function names beggining with "str" are reserved to libc implementation of string functions, recent glibc releases have strlcat and strlcpy exported as well..
The text was updated successfully, but these errors were encountered: