Skip to content

Commit

Permalink
build-sys: Disable composefs on too-old Linux headers
Browse files Browse the repository at this point in the history
This should fix the build with Google OSS-fuzz which currently
uses an old Ubuntu.
  • Loading branch information
cgwalters committed Aug 22, 2023
1 parent 16b97d8 commit f08b9eb
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,15 @@ AM_CONDITIONAL(USE_GPGME, test "x$have_gpgme" = xyes)

# These are needed by libcomposefs
AC_MSG_CHECKING([for new mount API (fsconfig)])
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[
#include <sys/mount.h>
int foo = MOUNT_ATTR_IDMAP;
]])],
[AC_MSG_RESULT(yes)
have_mount_attr_idmap=yes],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for new mount API (fsconfig)])
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[
#include <sys/mount.h>
Expand All @@ -295,9 +304,13 @@ AC_COMPILE_IFELSE(
AC_DEFINE([HAVE_FSCONFIG_CMD_CREATE_LINUX_MOUNT_H], 1, [Define if FSCONFIG_CMD_CREATE is available in linux/mount.h])],
[AC_MSG_RESULT(no)])

composefs_default=yes
if test x"$have_mount_attr_idmap" != xyes; then
composefs_default=no
fi
AC_ARG_WITH(composefs,
AS_HELP_STRING([--with-composefs], [Support composefs]),
:, with_composefs=yes)
:, with_composefs=$composefs_default)

if test x$with_composefs != xno; then OSTREE_FEATURES="$OSTREE_FEATURES composefs";
AC_DEFINE([HAVE_COMPOSEFS], 1, [Define if we have libcomposefs])
Expand Down

0 comments on commit f08b9eb

Please sign in to comment.