getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX
Subsystems (2)
PATCH 1/2 getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX
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) {
| ^~~~~~~~~~~~~~
```Signed-off-by Sam James <[email protected]>
--- getcifsacl.c | 1 + setcifsacl.c | 1 + 2 files changed, 2 insertions(+)
getcifsacl.c +1 -0
@@ -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"
setcifsacl.c +1 -0
@@ -48,6 +48,7 @@#include <errno.h> #include <limits.h> #include <ctype.h> +#include <linux/limits.h> #include <sys/xattr.h> #include "cifsacl.h"
Signature · 1 line
2.36.1
PATCH 2/2 getcifsacl, setcifsacl: add missing <endian.h> include for le32toh
Needed to fix build on musl libc. It only works by chance on glibc because of transitive includes (which could break at any time).
Example failure:
```
getcifsacl.c: In function 'print_ace':
getcifsacl.c:284:16: warning: implicit declaration of function 'le16toh' [-Wimplicit-function-declaration]
284 | size = le16toh(pace->size);
| ^~~~~~~
```Signed-off-by Sam James <[email protected]>
--- getcifsacl.c | 1 + setcifsacl.c | 1 + 2 files changed, 2 insertions(+)
getcifsacl.c +1 -0
@@ -23,6 +23,7 @@#include "config.h" #endif /* HAVE_CONFIG_H */ +#include <endian.h> #include <string.h> #include <getopt.h> #include <stdint.h>
setcifsacl.c +1 -0
@@ -38,6 +38,7 @@#include "config.h" #endif /* HAVE_CONFIG_H */ +#include <endian.h> #include <string.h> #include <getopt.h> #include <stdint.h>
Signature · 1 line
2.36.1