tools/build: Don't redefine open() for the linux bootstrap
authorAlex Richardson <arichardson@FreeBSD.org>
Mon, 2 Aug 2021 08:45:05 +0000 (09:45 +0100)
committerAlex Richardson <arichardson@FreeBSD.org>
Mon, 2 Aug 2021 13:33:23 +0000 (14:33 +0100)
commit5f6c8ce2452da2da233e37bf4c2b6fccde8594b1
treec8244bddbc0cecf2b1f80d0656962b400f63c591
parent1b1bb6f178802a4522824e0268634a99cdbda098
tools/build: Don't redefine open() for the linux bootstrap

This is needed to bootstrap llvm-tblgen on Linux since LLVM calls
`::open(...)` which does not work if open is a statement macro.
Also stop defining O_SHLOCK/O_EXLOCK and update the only bootstrap tools
user of those flags to deal with missing definitions.

Reviewed By: jrtc27
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31226
lib/libc/db/db/db.c
tools/build/cross-build/include/linux/fcntl.h