From: Michael Orlitzky Date: Mon, 16 Mar 2020 14:39:00 +0000 (-0400) Subject: src/libadacl.c: include limits.h for PATH_MAX. X-Git-Tag: v0.4.3~7 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=apply-default-acl.git;a=commitdiff_plain;h=31ad4413a85e4f826d52fa98ff19b4481e30d679;hp=c83f87aeecda6f212453b5881b8a9da4cfdf16cb 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 --- 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() */