]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add missing FreeBSD functions to -legacy when building on macOS/Linux
authorarichardson <arichardson@FreeBSD.org>
Tue, 25 Aug 2020 13:23:31 +0000 (13:23 +0000)
committerarichardson <arichardson@FreeBSD.org>
Tue, 25 Aug 2020 13:23:31 +0000 (13:23 +0000)
commit3617a4059b2e85bf5f4ad116f71e3db237279e69
treee0c68e3e2ec5ef91266afe23d2e5423bc06489a1
parenta62040de0cafe6580f010582c3caab95875c922f
Add missing FreeBSD functions to -legacy when building on macOS/Linux

In most cases this simply builds the file from lib/libc for missing
functions (e.g. strlcpy on Linux etc.). In cases where this is not possible
I've added an implementation to tools/build/cross-build.

The fgetln.c/fgetwln.c/closefrom.c compatibility code was obtained from
https://gitlab.freedesktop.org/libbsd/libbsd, but I'm not sure it makes
sense to import it into to contrib just for these three bootstrap files.

Reviewed By: brooks
Differential Revision: https://reviews.freebsd.org/D25978
17 files changed:
lib/libc/gen/arc4random.h
lib/libcapsicum/capsicum_helpers.h
tools/build/Makefile
tools/build/cross-build/capsicum_stubs.c [new file with mode: 0644]
tools/build/cross-build/closefrom.c [new file with mode: 0644]
tools/build/cross-build/fake_sysctl.c [new file with mode: 0644]
tools/build/cross-build/fgetln_fallback.c [new file with mode: 0644]
tools/build/cross-build/fgetwln_fallback.c [new file with mode: 0644]
tools/build/cross-build/local-link.h [new file with mode: 0644]
tools/build/cross-build/progname.c [new file with mode: 0644]
tools/build/libc-bootstrap/libc_private.h [new file with mode: 0644]
tools/build/libc-bootstrap/namespace.h [new file with mode: 0644]
tools/build/libc-bootstrap/un-namespace.h [new file with mode: 0644]
tools/build/mk/Makefile.boot
tools/build/mk/Makefile.boot.pre [new file with mode: 0644]
tools/build/mk/bsd.lib.mk
tools/build/mk/bsd.prog.mk