Date: Fri, 10 Sep 2021 00:19:45 GMT From: Jessica Clarke <jrtc27@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 877175a17a0a - main - libc: Fix build on case-insensitive file systems Message-ID: <202109100019.18A0JjTb017978@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=877175a17a0a5da3f4f43ca9f38adb04042f4cf5 commit 877175a17a0a5da3f4f43ca9f38adb04042f4cf5 Author: Jessica Clarke <jrtc27@FreeBSD.org> AuthorDate: 2021-09-10 00:19:38 +0000 Commit: Jessica Clarke <jrtc27@FreeBSD.org> CommitDate: 2021-09-10 00:19:38 +0000 libc: Fix build on case-insensitive file systems On case-insensitive file systems (most likely to be seen on macOS, where it is the default), _Fork.o for the new POSIX _Fork function conflicts with _fork.o for the PSEUDO file. This results in non-determinsitic behaviour in terms of which ends up being present; if _Fork.o wins then the build fails to link libc.so due to missing __sys_fork, and if _fork.o wins then libc silently fails to include the implementation of _Fork. A similar issue occurred in the past for C99's _Exit conflicting with exit(2) and was fixed in cb1cb6a2a83f, so this adds a fix based on that. As a longer-term solution it might be better to instead make the generated files use a different prefix that's less likely to conflict with other things (such as __sys_foo.o given they always contain that) but that's a rather more invasive change. Fixes: 49ad342cc10c ("Add _Fork()") Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31895 --- lib/libc/sys/Makefile.inc | 2 +- lib/libc/sys/{_Fork.c => POSIX2x_Fork.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 29e914872a8d..58ba333080b7 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -49,7 +49,7 @@ SRCS+= closefrom.c SRCS+= pipe.c SRCS+= shm_open.c SRCS+= vadvise.c -SRCS+= _Fork.c +SRCS+= POSIX2x_Fork.c SRCS+= compat-stub.c diff --git a/lib/libc/sys/_Fork.c b/lib/libc/sys/POSIX2x_Fork.c similarity index 100% rename from lib/libc/sys/_Fork.c rename to lib/libc/sys/POSIX2x_Fork.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109100019.18A0JjTb017978>