Date: Wed, 20 Nov 2019 17:24:50 +0000 (UTC) From: Alex Richardson <arichardson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354901 - head/usr.bin/xinstall Message-ID: <201911201724.xAKHOo80012270@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arichardson Date: Wed Nov 20 17:24:49 2019 New Revision: 354901 URL: https://svnweb.freebsd.org/changeset/base/354901 Log: Allow boostrapping xinstall on Linux Linux does not have st_flags so we have to avoid using it there. Reviewed By: emaste, imp Differential Revision: https://reviews.freebsd.org/D22446 Modified: head/usr.bin/xinstall/Makefile head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/Makefile ============================================================================== --- head/usr.bin/xinstall/Makefile Wed Nov 20 16:54:21 2019 (r354900) +++ head/usr.bin/xinstall/Makefile Wed Nov 20 17:24:49 2019 (r354901) @@ -11,7 +11,6 @@ MAN= install.1 .PATH: ${SRCTOP}/contrib/mtree CFLAGS+= -I${SRCTOP}/contrib/mtree CFLAGS+= -I${SRCTOP}/lib/libnetbsd -CFLAGS+= -DHAVE_STRUCT_STAT_ST_FLAGS=1 LIBADD= md Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Wed Nov 20 16:54:21 2019 (r354900) +++ head/usr.bin/xinstall/xinstall.c Wed Nov 20 17:24:49 2019 (r354901) @@ -75,6 +75,17 @@ __FBSDID("$FreeBSD$"); #include "mtree.h" +/* + * We need to build xinstall during the bootstrap stage when building on a + * non-FreeBSD system. Linux does not have the st_flags and st_birthtime + * members in struct stat so we need to omit support for changing those fields. + */ +#ifdef UF_SETTABLE +#define HAVE_STRUCT_STAT_ST_FLAGS 1 +#else +#define HAVE_STRUCT_STAT_ST_FLAGS 0 +#endif + #define MAX_CMP_SIZE (16 * 1024 * 1024) #define LN_ABSOLUTE 0x01
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911201724.xAKHOo80012270>