mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
cross-build: Provide mempcpy when building on macOS
We could patch the tzcode config to not use it, but it's simple to provide an implementation of it and avoid spreading cross-build bootstrapping special cases. Fixes:ff2c98b30b("tzcode: Update to 2026a") MFC after: 1 week (cherry picked from commit47402c9422)
This commit is contained in:
1 parent
0d995ef541
commit
db9fd99ba8
2 files changed
+9
No files matched your search
@@ -183,6 +183,13 @@ SRCS+= progname.c
|
||||
# Stub implementations of fflagstostr/strtofflags
|
||||
SRCS+= fflags.c
|
||||
.endif
|
||||
|
||||
.if ${.MAKE.OS} == "Darwin"
|
||||
# macOS currently lacks mempcpy
|
||||
.PATH: ${LIBC_SRCTOP}/string
|
||||
SRCS+= mempcpy.c
|
||||
.endif # ${MAKE.OS} == "Darwin"
|
||||
|
||||
# Provide the same arc4random implementation on Linux/macOS
|
||||
CFLAGS.arc4random.c+= -I${SRCTOP}/sys/crypto/chacha20 -D__isthreaded=1
|
||||
SRCS+= arc4random.c arc4random_uniform.c
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#include_next <string.h>
|
||||
|
||||
void *(mempcpy)(void * __restrict, const void * __restrict, size_t);
|
||||
|
||||
/*
|
||||
* strchrnul is provided by macOS 15.4 and later. However, there is
|
||||
* no good way to detect the current host version at compile time, so
|
||||
|
||||
Reference in new issue
Block a user