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
This commit is contained in:
Warner Losh 2022-01-04 14:12:44 -07:00
parent d373e61ef3
commit f3d7ace4b2

View file

@ -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