Message ID | 20220624045432.991655-1-sam@gentoo.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX | expand |
diff --git a/getcifsacl.c b/getcifsacl.c index 1c01062..d69d40a 100644 --- a/getcifsacl.c +++ b/getcifsacl.c @@ -34,6 +34,7 @@ #include <errno.h> #include <limits.h> #include <ctype.h> +#include <linux/limits.h> #include <sys/xattr.h> #include "cifsacl.h" #include "idmap_plugin.h" diff --git a/setcifsacl.c b/setcifsacl.c index 9840b14..e925d59 100644 --- a/setcifsacl.c +++ b/setcifsacl.c @@ -48,6 +48,7 @@ #include <errno.h> #include <limits.h> #include <ctype.h> +#include <linux/limits.h> #include <sys/xattr.h> #include "cifsacl.h"
Needed to build on musl. It only works on glibc because of transitive includes (which could break in future). Example failure: ``` getcifsacl.c: In function 'getcifsacl': getcifsacl.c:429:24: error: 'XATTR_SIZE_MAX' undeclared (first use in this function) 429 | if (bufsize >= XATTR_SIZE_MAX) { | ^~~~~~~~~~~~~~ ``` Bug: https://bugs.gentoo.org/842195 Signed-off-by: Sam James <sam@gentoo.org> --- getcifsacl.c | 1 + setcifsacl.c | 1 + 2 files changed, 2 insertions(+)