new file mode 100644
@@ -0,0 +1,103 @@
+From 2c34d378e3b4a63339ed7f6d82a6486402d5616a Mon Sep 17 00:00:00 2001
+From: Pavel Cahyna <pcahyna@redhat.com>
+Date: Wed, 24 Jun 2026 18:45:30 +0200
+Subject: [PATCH] Avoid acl_ prefix for functions
+
+The acl.h header from libacl uses acl_ prefix for its functions. Avoid
+defining functions with the same name in order to protect its namespace.
+
+Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/tar.git/commit/?id=08c3fc2e9337094aff01a511170fd35fdb8f1ee3]
+
+Backport Changes:
+- Adapt helper calls to tar 1.35's chdir_fd/file_name arguments
+ instead of upstream's newer fdbase interface.
+- Keep the existing acl_delete_def_file_at and acl_set_file_at
+ diagnostic text to preserve tar 1.35's gettext message IDs.
+ Diagnostic strings cannot conflict with libacl declarations.
+ Omitting those two diagnostic renames gives 13 insertions and
+ 13 deletions instead of upstream's 15 insertions and deletions.
+
+(cherry picked from commit 08c3fc2e9337094aff01a511170fd35fdb8f1ee3)
+Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
+---
+ src/xattrs.c | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/xattrs.c b/src/xattrs.c
+index 86a7e59c..bf2c4f0e 100644
+--- a/src/xattrs.c
++++ b/src/xattrs.c
+@@ -139,13 +139,13 @@ static struct
+ #ifdef HAVE_POSIX_ACLS
+
+ /* acl-at wrappers, TODO: move to gnulib in future? */
+-static acl_t acl_get_file_at (int, const char *, acl_type_t);
+-static int acl_set_file_at (int, const char *, acl_type_t, acl_t);
++static acl_t tar_acl_get_file_at (int, const char *, acl_type_t);
++static int tar_acl_set_file_at (int, const char *, acl_type_t, acl_t);
+ static int file_has_acl_at (int, char const *, struct stat const *);
+-static int acl_delete_def_file_at (int, char const *);
++static int tar_acl_delete_def_file_at (int, char const *);
+
+-/* acl_get_file_at */
+-#define AT_FUNC_NAME acl_get_file_at
++/* tar_acl_get_file_at */
++#define AT_FUNC_NAME tar_acl_get_file_at
+ #define AT_FUNC_RESULT acl_t
+ #define AT_FUNC_FAIL (acl_t)NULL
+ #define AT_FUNC_F1 acl_get_file
+@@ -159,8 +159,8 @@ static int acl_delete_def_file_at (int, char const *);
+ #undef AT_FUNC_POST_FILE_PARAM_DECLS
+ #undef AT_FUNC_POST_FILE_ARGS
+
+-/* acl_set_file_at */
+-#define AT_FUNC_NAME acl_set_file_at
++/* tar_acl_set_file_at */
++#define AT_FUNC_NAME tar_acl_set_file_at
+ #define AT_FUNC_F1 acl_set_file
+ #define AT_FUNC_POST_FILE_PARAM_DECLS , acl_type_t type, acl_t acl
+ #define AT_FUNC_POST_FILE_ARGS , type, acl
+@@ -170,8 +170,8 @@ static int acl_delete_def_file_at (int, char const *);
+ #undef AT_FUNC_POST_FILE_PARAM_DECLS
+ #undef AT_FUNC_POST_FILE_ARGS
+
+-/* acl_delete_def_file_at */
+-#define AT_FUNC_NAME acl_delete_def_file_at
++/* tar_acl_delete_def_file_at */
++#define AT_FUNC_NAME tar_acl_delete_def_file_at
+ #define AT_FUNC_F1 acl_delete_def_file
+ #define AT_FUNC_POST_FILE_PARAM_DECLS
+ #define AT_FUNC_POST_FILE_ARGS
+@@ -299,7 +299,7 @@ xattrs__acls_set (struct tar_stat_info const *st,
+ /* No "default" IEEE 1003.1e ACL set for directory. At this moment,
+ FILE_NAME may already have inherited default acls from parent
+ directory; clean them up. */
+- if (acl_delete_def_file_at (chdir_fd, file_name))
++ if (tar_acl_delete_def_file_at (chdir_fd, file_name))
+ WARNOPT (WARN_XATTR_WRITE,
+ (0, errno,
+ _("acl_delete_def_file_at: Cannot drop default POSIX ACLs "
+@@ -316,7 +316,7 @@ xattrs__acls_set (struct tar_stat_info const *st,
+ return;
+ }
+
+- if (acl_set_file_at (chdir_fd, file_name, type, acl) == -1)
++ if (tar_acl_set_file_at (chdir_fd, file_name, type, acl) == -1)
+ /* warn even if filesystem does not support acls */
+ WARNOPT (WARN_XATTR_WRITE,
+ (0, errno,
+@@ -357,10 +357,10 @@ acls_get_text (int parentfd, const char *file_name, acl_type_t type,
+ char *val = NULL;
+ acl_t acl;
+
+- if (!(acl = acl_get_file_at (parentfd, file_name, type)))
++ if (!(acl = tar_acl_get_file_at (parentfd, file_name, type)))
+ {
+ if (errno != ENOTSUP)
+- call_arg_warn ("acl_get_file_at", file_name);
++ call_arg_warn ("tar_acl_get_file_at", file_name);
+ return;
+ }
+
+--
+2.35.6
@@ -46,6 +46,7 @@ SRC_URI += " \
file://CVE-2026-5704-dependent_p2.patch \
file://CVE-2026-5704.patch \
file://CVE-2026-5704-regression.patch \
+ file://Avoid-acl_-prefix-for-functions.patch \
"
inherit ptest