Re: [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merged #1 and #2 into next. Thanks. Sorry, I missed these patches previously.

Best regards,
Pavel Shilovsky

пн, 15 авг. 2022 г. в 17:43, Sam James <sam@xxxxxxxxxx>:
>
> 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@xxxxxxxxxx>
> ---
>  getcifsacl.c | 1 +
>  setcifsacl.c | 1 +
>  2 files changed, 2 insertions(+)
>
> 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 d832cec..b7079ab 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"
> --
> 2.37.2
>





[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux