]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
src/libadacl.c: include limits.h for PATH_MAX.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 16 Mar 2020 14:39:00 +0000 (10:39 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 16 Mar 2020 14:39:00 +0000 (10:39 -0400)
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
src/libadacl.c

index 2970bc50a78c959735397ce7cafb6bad1ee692eb..83729dc544abccc1735c8b2c78721b6965d77c58 100644 (file)
@@ -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)
index 6f74004db57d40ce2be232b97971b0c3a250093c..a21aa709ba842bc7bd21aa672b99b4e3cb750cf0 100644 (file)
@@ -14,6 +14,7 @@
 #include <errno.h>      /* EINVAL, ELOOP, ENOTDIR, etc. */
 #include <fcntl.h>      /* openat() */
 #include <libgen.h>     /* basename(), dirname() */
+#include <limits.h>     /* PATH_MAX */
 #include <stdbool.h>    /* the "bool" type */
 #include <stdio.h>      /* perror(), asprintf() */
 #include <stdlib.h>     /* free() */