Fix crossbuild bootstrap tools build with Clang 12

Clang 12 no longer allows re-defining a weak symbol as non-weak. This
happed here because we compile err.c with _err defined to err. To fix
this, use the same approach as the libc namespace.h
This commit is contained in:
Alex Richardson 2021-02-10 11:05:02 +00:00
parent 8a439f324e
commit 02af91c52e
2 changed files with 7 additions and 2 deletions

View File

@ -45,7 +45,9 @@
#define _writev(a, b, c) writev(a, b, c)
#define _fsync(a) fsync(a)
#define _getprogname() getprogname()
#define _err(...) err(__VA_ARGS__)
/* These two need to be renamed to build libc/gen/err.c */
#define err _err
#define warn _warn
#define _pthread_mutex_unlock pthread_mutex_unlock
#define _pthread_mutex_lock pthread_mutex_lock

View File

@ -36,5 +36,8 @@
* $FreeBSD$
*/
#pragma once
/* This can be empty when building the FreeBSD compatible bootstrap files */
/* Undo the changes made by namespace.h */
#undef err
#undef warn