/* AI indicates XATTR may be present but wasn't accessible.
This is the case when [l]listxattr failed with E2BIG,
- or failed with EACCES which in Linux kernel 6.12 NFS can mean merely
- that we lack read access.
+ or is not supported (!acl_errno_valid()), or failed with EACCES
+ which in Linux kernel 6.12 NFS can mean merely that we lack read access.
*/
static bool
aclinfo_may_indicate_xattr (struct aclinfo const *ai)
{
- return ai->size < 0 && (ai->u.err == EACCES || ai->u.err == E2BIG);
+ return ai->size < 0 && (!acl_errno_valid (ai->u.err)
+ || ai->u.err == EACCES || ai->u.err == E2BIG);
}
/* Does NAME have XATTR? */
# if defined _AIX || defined __hpux || defined __sun || defined __QNX__
# include <stdio.h>
# endif
+# if defined MUSL_LIBC || (defined __FreeBSD__ || defined __DragonFly__) || defined __NetBSD__ || defined __OpenBSD__ || (defined __APPLE__ && defined __MACH__) || defined _AIX || defined __sun || defined __minix || defined __HAIKU__
+# include <unistd.h>
+# endif
# ifndef __GETOPT_ID
# define __GETOPT_CONCAT(x, y) x ## y
ifneq (,$(GL_GENERATE_MINI_GMP_H_CONDITION))
# Build gmp.h as a wrapper for mini-gmp.h when using mini-gmp.
gmp.h: $(top_builddir)/config.status
- echo '#include "mini-gmp.h"' > $@-t
- echo '#if GNULIB_LIBGMP_MPQ' >> $@-t
- echo '# include "mini-mpq.h"' >> $@-t
- echo '#endif' >> $@-t
- mv $@-t $@
+ $(gl_V_at)echo '#include "mini-gmp.h"' > $@-t
+ $(AM_V_at)echo '#if GNULIB_LIBGMP_MPQ' >> $@-t
+ $(AM_V_at)echo '# include "mini-mpq.h"' >> $@-t
+ $(AM_V_at)echo '#endif' >> $@-t
+ $(AM_V_at)mv $@-t $@
endif
ifneq (,$(GL_GENERATE_GMP_GMP_H_CONDITION))
# Build gmp.h as a wrapper for gmp/gmp.h.
gmp.h: $(top_builddir)/config.status
- echo '#include <gmp/gmp.h>' > $@-t
- mv $@-t $@
+ $(gl_V_at)echo '#include <gmp/gmp.h>' > $@-t
+ $(AM_V_at)mv $@-t $@
endif
else
gmp.h: $(top_builddir)/config.status
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1])
])
gl_UNISTD_MODULE_INDICATOR([getopt-posix])
+ gl_MUSL_LIBC
AC_REQUIRE([AC_CANONICAL_HOST])
gl_FUNC_GETRANDOM
gl_CONDITIONAL([GL_COND_OBJ_GETRANDOM],