From: Michał Górny Date: Sat, 21 Sep 2024 02:44:06 +0000 (+0200) Subject: tar/write.h: Support `sys/xattr.h` (#2335) X-Git-Tag: v3.8.0~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa7e9cd7cbcd41386c30cc75a706805dd4e42716;p=thirdparty%2Flibarchive.git tar/write.h: Support `sys/xattr.h` (#2335) Synchronize the last use of `attr/xattr.h` to support using `sys/xattr.h` instead. The former header is deprecated on GNU/Linux, and this replacement makes it possible to build libarchive without the `attr` package. --- diff --git a/tar/write.c b/tar/write.c index 1d1139f4c..43cd70233 100644 --- a/tar/write.c +++ b/tar/write.c @@ -32,7 +32,9 @@ #ifdef HAVE_SYS_STAT_H #include #endif -#ifdef HAVE_ATTR_XATTR_H +#if HAVE_SYS_XATTR_H +#include +#elif HAVE_ATTR_XATTR_H #include #endif #ifdef HAVE_ERRNO_H