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

Fix unresolved reference when using optimization flag (-O2) against musl #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Guiglin
Copy link

@Guiglin Guiglin commented Feb 1, 2025

In case you want to fortify headers you get errors like this:

/usr/include/fortify/unistd.h:156:1: error: reference to overloaded function could not be resolved; did you mean to call it?
  156 | _FORTIFY_FN(readlink) ssize_t readlink(const char *__p,

This is due of the readlink function from osutils.h that conflicts with readlink from unistd.h. To avoid that I propose to simply rename string readlink to string readsymlink.
To test, just add -O2 in the src/Makefile to CXXFLAGS

@Guiglin Guiglin changed the title Fix unresolved reference when using optimization flag (-O2) among musl Fix unresolved reference when using optimization flag (-O2) against musl Feb 5, 2025
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.

1 participant