openat has been supported since Linux 2.6.16 and glibc 2.4. Note that xfs_db already uses it without the ifdef. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- configure.ac | 1 - include/builddefs.in | 1 - m4/package_libcdev.m4 | 14 -------------- scrub/Makefile | 4 ++-- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/configure.ac b/configure.ac index a967322cf..b0c76d619 100644 --- a/configure.ac +++ b/configure.ac @@ -182,7 +182,6 @@ if test "$enable_scrub" = "yes"; then AC_MSG_ERROR([libicu not found.]) fi fi -AC_HAVE_OPENAT AC_HAVE_FSTATAT AC_HAVE_SG_IO AC_HAVE_HDIO_GETGEO diff --git a/include/builddefs.in b/include/builddefs.in index c359cde45..b050b6c49 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -102,7 +102,6 @@ HAVE_MALLINFO = @have_mallinfo@ HAVE_MALLINFO2 = @have_mallinfo2@ HAVE_LIBATTR = @have_libattr@ HAVE_LIBICU = @have_libicu@ -HAVE_OPENAT = @have_openat@ HAVE_FSTATAT = @have_fstatat@ HAVE_SG_IO = @have_sg_io@ HAVE_HDIO_GETGEO = @have_hdio_getgeo@ diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index 320809a62..46abf7460 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -177,20 +177,6 @@ test = mallinfo2(); AC_SUBST(have_mallinfo2) ]) -# -# Check if we have a openat call -# -AC_DEFUN([AC_HAVE_OPENAT], - [ AC_CHECK_DECL([openat], - have_openat=yes, - [], - [#include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h>] - ) - AC_SUBST(have_openat) - ]) - # # Check if we have a fstatat call # diff --git a/scrub/Makefile b/scrub/Makefile index f3e22a9d6..c6ca3cff7 100644 --- a/scrub/Makefile +++ b/scrub/Makefile @@ -6,11 +6,11 @@ TOPDIR = .. builddefs=$(TOPDIR)/include/builddefs include $(builddefs) -SCRUB_PREREQS=$(HAVE_OPENAT)$(HAVE_FSTATAT)$(HAVE_GETFSMAP) +SCRUB_PREREQS=$(HAVE_FSTATAT)$(HAVE_GETFSMAP) scrub_svcname=xfs_scrub@.service -ifeq ($(SCRUB_PREREQS),yesyesyes) +ifeq ($(SCRUB_PREREQS),yesyes) LTCOMMAND = xfs_scrub INSTALL_SCRUB = install-scrub XFS_SCRUB_ALL_PROG = xfs_scrub_all -- 2.39.2