Skip to content
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

Provide own basename API implementation #1467

Closed
wants to merge 1 commit into from

Conversation

kraj
Copy link
Contributor

@kraj kraj commented Jun 3, 2024

basename prototype has been removed from string.h from latest musl [1] compilers e.g. clang-18 flags the absense of prototype as error, it turns out the basename has two different implementations and musl only provides POSIX implementation, whereas glibc has GNU version and posix version both depending upon if string.h is included or not it will pick GNU version,

to avoid this dependency, lets implement own basename function which reflects GNU basename behavior, it will work across all libcs

[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7

@jgunthorpe
Copy link
Member

Again, why don't we try to convert the callers over to the POSIX behavior? That seems a bit better doesn't it?

@kraj
Copy link
Contributor Author

kraj commented Jun 3, 2024

Again, why don't we try to convert the callers over to the POSIX behavior? That seems a bit better doesn't it?

that needs testing, and I am not that familiar with rdma-core code to do it.

@kraj kraj force-pushed the kraj/basename branch from 3059088 to 8eb8bc8 Compare June 3, 2024 18:05
basename prototype has been removed from string.h from latest musl [1]
compilers e.g. clang-18 flags the absense of prototype as error, it turns
out the basename has two different implementations and musl only provides
POSIX implementation, whereas glibc has GNU version and posix version both
depending upon if string.h is included or not it will pick GNU version,

to avoid this dependency, lets implement own basename function which
reflects GNU basename behavior, it will work across all libcs

[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7

Signed-off-by: Khem Raj <raj.khem@gmail.com>
@rleon
Copy link
Member

rleon commented Jun 19, 2024

It was fixed in @nmorey PR.

Thanks

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.

3 participants