[Rpm-maint] [PATCH 2/5] Only build bundled fts if system has a bad version that doesn't handle LFS

Mark Wielaard mjw at redhat.com
Fri Mar 24 10:13:55 UTC 2017


On Fri, 2017-03-24 at 11:15 +0200, Panu Matilainen wrote:
> On 03/23/2017 08:21 PM, Gleb Fotengauer-Malinovskiy wrote:
> > diff --git a/configure.ac b/configure.ac
> > index bdcb741..687d58c 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -717,6 +717,9 @@ AC_CHECK_FUNCS(
> >     [mkstemp getcwd basename dirname realpath setenv unsetenv regcomp lchown utimes],
> >     [], [AC_MSG_ERROR([function required by rpm])])
> >
> > +AC_CHECK_HEADERS([fts.h])
> > +AM_CONDITIONAL([USE_BUNDLED_FTS_KLUDGE], [test "$ac_cv_header_fts_h" = no])
> > +
> >  AC_LIBOBJ(fnmatch)
> >
> 
> How exactly does this ensure the system fts.h is LFS compatible?

The configure.ac has an AC_SYS_LARGEFILE fairly early. Which will define
_FILE_OFFSET_BITS 64 on 32-bit systems that need it. So on such systems
when AC_CHECK_HEADERS([fts.h]) is ran it will have that define in the
conftest.c and the test compile will fail because old fts.h have an
explicit check (error out on) -D_FILE_OFFSET_BITS==64.

Cheers,

Mark


More information about the Rpm-maint mailing list