From 31ad4413a85e4f826d52fa98ff19b4481e30d679 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 16 Mar 2020 10:39:00 -0400 Subject: [PATCH] src/libadacl.c: include limits.h for PATH_MAX. We incidentally get PATH_MAX on linux/glibc by way of dirent.h, but POSIX says that it should be defined in limits.h. We now include limits.h explicitly to fix the build with musl. Gentoo-bug: https://bugs.gentoo.org/712844 --- configure.ac | 3 ++- src/libadacl.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2970bc5..83729dc 100644 --- a/configure.ac +++ b/configure.ac @@ -13,13 +13,14 @@ AM_PROG_AR AC_HEADER_DIRENT # dirent.h AC_HEADER_STAT # sys/stat.h AC_HEADER_STDBOOL # stdbool.h -AC_HEADER_STDC # stdlib.h string.h (implied: errno.h limits.h stdio.h) +AC_HEADER_STDC # stdlib.h string.h (implied: errno.h stdio.h) # Check for header files not covered by the predefined macros above. AC_HEADER_REQUIRE(acl/libacl.h) AC_HEADER_REQUIRE(fcntl.h) AC_HEADER_REQUIRE(getopt.h) AC_HEADER_REQUIRE(libgen.h) +AC_HEADER_REQUIRE(limits.h) AC_HEADER_REQUIRE(linux/xattr.h) AC_HEADER_REQUIRE(sys/acl.h) AC_HEADER_REQUIRE(unistd.h) diff --git a/src/libadacl.c b/src/libadacl.c index 6f74004..a21aa70 100644 --- a/src/libadacl.c +++ b/src/libadacl.c @@ -14,6 +14,7 @@ #include /* EINVAL, ELOOP, ENOTDIR, etc. */ #include /* openat() */ #include /* basename(), dirname() */ +#include /* PATH_MAX */ #include /* the "bool" type */ #include /* perror(), asprintf() */ #include /* free() */ -- 2.43.2