All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX
@ 2022-08-16  0:43 Sam James
  2022-08-16  0:43 ` [PATCH 2/2] getcifsacl, setcifsacl: add missing <endian.h> include for le32toh Sam James
  2024-03-26  1:26 ` [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX Pavel Shilovsky
  0 siblings, 2 replies; 4+ messages in thread
From: Sam James @ 2022-08-16  0:43 UTC (permalink / raw)
  To: Pavel Shilovsky, linux-cifs; +Cc: Pavel Shilovsky, Sam James

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(+)

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] getcifsacl, setcifsacl: add missing <endian.h> include for le32toh
  2022-08-16  0:43 [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX Sam James
@ 2022-08-16  0:43 ` Sam James
  2024-03-26  1:26 ` [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX Pavel Shilovsky
  1 sibling, 0 replies; 4+ messages in thread
From: Sam James @ 2022-08-16  0:43 UTC (permalink / raw)
  To: Pavel Shilovsky, linux-cifs; +Cc: Pavel Shilovsky, Sam James

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);
      |                ^~~~~~~
```

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(+)

diff --git a/getcifsacl.c b/getcifsacl.c
index d69d40a..123d11e 100644
--- a/getcifsacl.c
+++ b/getcifsacl.c
@@ -23,6 +23,7 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#include <endian.h>
 #include <string.h>
 #include <getopt.h>
 #include <stdint.h>
diff --git a/setcifsacl.c b/setcifsacl.c
index b7079ab..0bdc176 100644
--- a/setcifsacl.c
+++ b/setcifsacl.c
@@ -38,6 +38,7 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#include <endian.h>
 #include <string.h>
 #include <getopt.h>
 #include <stdint.h>
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX
  2022-08-16  0:43 [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX Sam James
  2022-08-16  0:43 ` [PATCH 2/2] getcifsacl, setcifsacl: add missing <endian.h> include for le32toh Sam James
@ 2024-03-26  1:26 ` Pavel Shilovsky
  1 sibling, 0 replies; 4+ messages in thread
From: Pavel Shilovsky @ 2024-03-26  1:26 UTC (permalink / raw)
  To: Sam James; +Cc: linux-cifs, Steve French

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

Best regards,
Pavel Shilovsky

пн, 15 авг. 2022 г. в 17:43, Sam James <sam@gentoo.org>:
>
> 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(+)
>
> 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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] getcifsacl, setcifsacl: add missing <endian.h> include for le32toh
  2022-06-24  4:54 Sam James
@ 2022-06-24  4:54 ` Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-06-24  4:54 UTC (permalink / raw)
  To: linux-cifs; +Cc: Sam James

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);
      |                ^~~~~~~
```

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(+)

diff --git a/getcifsacl.c b/getcifsacl.c
index d69d40a..123d11e 100644
--- a/getcifsacl.c
+++ b/getcifsacl.c
@@ -23,6 +23,7 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#include <endian.h>
 #include <string.h>
 #include <getopt.h>
 #include <stdint.h>
diff --git a/setcifsacl.c b/setcifsacl.c
index e925d59..84cd0b3 100644
--- a/setcifsacl.c
+++ b/setcifsacl.c
@@ -38,6 +38,7 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#include <endian.h>
 #include <string.h>
 #include <getopt.h>
 #include <stdint.h>
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-26  1:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16  0:43 [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX Sam James
2022-08-16  0:43 ` [PATCH 2/2] getcifsacl, setcifsacl: add missing <endian.h> include for le32toh Sam James
2024-03-26  1:26 ` [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> include for XATTR_SIZE_MAX Pavel Shilovsky
  -- strict thread matches above, loose matches on Subject: below --
2022-06-24  4:54 Sam James
2022-06-24  4:54 ` [PATCH 2/2] getcifsacl, setcifsacl: add missing <endian.h> include for le32toh Sam James

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.