git: f3d7ace4b235 - main - file: Turns out we need xlocal.h protection
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 04 Jan 2022 21:13:43 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f3d7ace4b235422e5ccff0315f2965ac935241d8 commit f3d7ace4b235422e5ccff0315f2965ac935241d8 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-01-04 21:12:44 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-01-04 21:12:59 +0000 file: Turns out we need xlocal.h protection It turns out that we still need xlocal.h protection for when we're cross building on Linux. Linux doesn't have this file, but os/x does. Before, we'd assume we didn't have it, like old FreeBSD, when cross compiling. After the latest update, all that code was removed so cross compiling needs to be handled separaetly. Do so by defining HAVE_XLOCALE_H only when we're not building on linux. This allows us to build the mkmagic build tool needed to build file(1). Sponsored by: Netflix Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D33741 --- lib/libmagic/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libmagic/config.h b/lib/libmagic/config.h index 816087e19b5d..35d090dd48b9 100644 --- a/lib/libmagic/config.h +++ b/lib/libmagic/config.h @@ -254,7 +254,9 @@ #define HAVE_WORKING_VFORK 1 /* Define to 1 if you have the <xlocale.h> header file. */ +#ifndef __linux__ /* Cross building tools build with glibc on linux */ #define HAVE_XLOCALE_H 1 +#endif /* Define to 1 if you have the <zlib.h> header file. */ #define HAVE_ZLIB_H 1