Certain libraries (e.g. epoll-shim) interpose libc's fcntl and there
is currently no portable way to interpose a variadic function without
relying on undefined behaviour. Adding a variant of fcntl that takes a
va_list instead of variadic arguments allows safely interposing fcntl.
While we can get away with reading a non-existent variadic argument on
all currently supported architectures (we just read garbage from the
next argument register or the stack), this is not possible for
architectures that pass pointers/integers in different registers or ones
that perform bounds checks on variadic arguments (e.g. CHERI). For
CHERI architectures, CheriBSD carries a downstream patch to only read
an argument for cmd values that expect one (and needs to take care to
read the correct type as well to avoid bounds errors).