ksh93 / ksh

ksh 93u+m: KornShell lives! | Latest release: https://github.com/ksh93/ksh/releases
Eclipse Public License 2.0
192 stars 32 forks source link

Fix compile on Alpine Linux when using fortified headers #745

Closed JohnoKing closed 5 months ago

JohnoKing commented 7 months ago

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 https://github.com/ksh93/ksh/issues/743#issuecomment-2056370256.)

Fixes https://github.com/ksh93/ksh/issues/743

HansH111 commented 6 months ago

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