Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 842195 - net-fs/cifs-utils-6.13-r1 - In function 'getcifsacl': getcifsacl.c:429:24: error: 'XATTR_SIZE_MAX' undeclared (first use in this function) (on musl))
Summary: net-fs/cifs-utils-6.13-r1 - In function 'getcifsacl': getcifsacl.c:429:24: er...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
Depends on:
Reported: 2022-05-02 14:34 UTC by ernsteiswuerfel
Modified: 2022-06-24 09:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

emerge --info (file_842195.txt,7.08 KB, text/plain)
2022-05-02 14:34 UTC, ernsteiswuerfel
build.log (cifs-utils-6.13-r1:20220502-122721.log,12.07 KB, text/plain)
2022-05-02 14:34 UTC, ernsteiswuerfel
musl patch for net-fs/cifs-utils-6.13 (cifs-utils-6.11-musl.patch,674 bytes, patch)
2022-06-23 15:40 UTC, CFuga
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2022-05-02 14:34:20 UTC
Created attachment 776096 [details]
emerge --info

As cifs-utils-6.13-r1 previously built with musl this is probably musl-1.2.3 related.

make[2]: Entering directory '/var/tmp/portage/net-fs/cifs-utils-6.13-r1/work/cifs-utils-6.13'
x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I.    -Wall -Wextra -D_FORTIFY_SOURCE=2 -fpie -pie -Wl,-z,relro,-z,now -Os -march=bdver2 -mtune=bdver2 -pipe -c -o getcifsacl.o getcifsacl.c
getcifsacl.c: In function 'print_sid':
getcifsacl.c:272:31: warning: implicit declaration of function 'le32toh' [-Wimplicit-function-declaration]
  272 |                 printf("-%u", le32toh(csid->sub_auth[i]));
      |                               ^~~~~~~
getcifsacl.c: In function 'print_ace':
getcifsacl.c:284:16: warning: implicit declaration of function 'le16toh' [-Wimplicit-function-declaration]
  284 |         size = le16toh(pace->size);
      |                ^~~~~~~
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) {
      |                        ^~~~~~~~~~~~~~
getcifsacl.c:429:24: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [Makefile:861: getcifsacl.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-fs/cifs-utils-6.13-r1/work/cifs-utils-6.13'
make[1]: *** [Makefile:984: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-fs/cifs-utils-6.13-r1/work/cifs-utils-6.13'
make: *** [Makefile:497: all] Error 2
 * ERROR: net-fs/cifs-utils-6.13-r1::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2022-05-02 14:34:40 UTC
Created attachment 776099 [details]
Comment 2 CFuga 2022-06-23 15:40:50 UTC
Created attachment 787112 [details, diff]
musl patch for net-fs/cifs-utils-6.13

This patch adds the following include files in getcifsacl.c and setcifsacl.c

#include <linux/limits.h>
#include <endian.h>

The first include declares XATTR_SIZE_MAX and the last include defines le32toh() and le16toh()
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-24 04:56:23 UTC
Thanks. I've been meaning to send these upstream for ages but for some reason, everyone puts it off w/ the Samba stack. Done at
Comment 4 Larry the Git Cow gentoo-dev 2022-06-24 05:26:21 UTC
The bug has been closed via the following commit(s):

commit fa0dfbb6b2c16007e97457e3bda1ca88b85860fe
Author:     Sam James <>
AuthorDate: 2022-06-24 05:03:51 +0000
Commit:     Sam James <>
CommitDate: 2022-06-24 05:26:08 +0000

    net-fs/cifs-utils: fix build on musl
    Acked-by: David Seifert <>
    Signed-off-by: Sam James <>

 net-fs/cifs-utils/cifs-utils-6.15.ebuild           |  1 +
 net-fs/cifs-utils/files/cifs-utils-6.15-musl.patch | 80 ++++++++++++++++++++++
 2 files changed, 81 insertions(+)
Comment 5 ernsteiswuerfel archtester 2022-06-24 08:59:00 UTC
Thanks! +1 for samba.