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 compile on Alpine Linux when using fortified headers #745

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

Conversation

JohnoKing
Copy link

This commit removes obsolete compatibility code that was causing compilation errors on Alpine Linux when the fortify-headers package is installed. In short, the readlink, symlink and realpath compatibility functions in src/lib/libast/comp don't work with Alpine Linux's fortified headers. None of these functions are necessary to compile on current operating systems (tested on Linux with glibc and musl, {Free,Net,Open,DragonFly}BSD, illumos, Haiku and Cygwin) so these can be safely deleted. Additionally, some spurious macro hackery relating to poll, strlcpy, strlcat and networking functions used in libcmd uname has also been deleted. (The patch to univlib.h is taken from #743 (comment).)

Fixes #743

This commit removes obsolete compatibility code that was causing
compilation errors on Alpine Linux when the fortify-headers package is
installed. In short, the readlink, symlink and realpath compatibility
functions in src/lib/libast/comp don't work with Alpine Linux's
fortified headers. None of these functions are necessary to compile on
current operating systems (tested on Linux with glibc and musl,
{Free,Net,Open,DragonFly}BSD, illumos, Haiku and Cygwin) so these can be
safely deleted. Additionally, some spurious macro hackery relating to
strlcpy, strlcat and networking functions used in libcmd uname has also
been deleted. (The patch to univlib.h is taken from
ksh93#743 (comment).)

Co-authored-by: xorrvin <[email protected]>
@HansH111
Copy link

After this patch ksh compiles again on Alpine with fortified headers.

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.

Unable to build on Alpine
2 participants