From 503ef6d4ddd62e1f608b5f3d0e62dd0a2c2a4426 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Thu, 14 Dec 2017 19:36:14 -0500 Subject: [PATCH] build: Correct libroot_build's usage of xattrs on a Haiku host. Implemented by just not defining the functions at all and letting the Haiku ones shine through. In the future, though, we should wrap them properly. (Between the switch to libroot_build and this commit, libroot_build was using the generic attribute emulation layer on Haiku ... whoops.) --- configure | 6 +++++- src/build/libroot/fs_attr.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 922665c76d..80451268f7 100755 --- a/configure +++ b/configure @@ -395,6 +395,10 @@ check_native_xattrs() local xattr_get= local xattr_get_args= case $HOST_PLATFORM in + haiku_host) + xattr_set="addattr"; xattr_set_args="\$NAME \"\$VALUE\"" + xattr_get="catattr"; xattr_get_args="\$NAME" + ;; darwin) xattr_set="xattr"; xattr_set_args="-w \$NAME \"\$VALUE\"" xattr_get="xattr"; xattr_get_args="-p \$NAME" @@ -751,7 +755,7 @@ if [ $caseInsensitive != 0 ]; then fi # check xattr support -if [ $HOST_PLATFORM != "haiku_host" ] && [ -z $HAIKU_HOST_USE_XATTR_REF ]; then +if [ -z $HAIKU_HOST_USE_XATTR_REF ]; then check_native_xattrs attrSupport=$? if [ $attrSupport = 2 ] && [ -z $HAIKU_HOST_USE_XATTR ]; then diff --git a/src/build/libroot/fs_attr.cpp b/src/build/libroot/fs_attr.cpp index 7dea6a015f..c56a919ba6 100644 --- a/src/build/libroot/fs_attr.cpp +++ b/src/build/libroot/fs_attr.cpp @@ -1,5 +1,9 @@ #ifdef HAIKU_HOST_USE_XATTR -# include "fs_attr_untyped.cpp" +# ifdef HAIKU_HOST_PLATFORM_HAIKU + // Do nothing; we allow libroot's fs_attr symbols to shine through. +# else +# include "fs_attr_untyped.cpp" +# endif #else # include "fs_attr_generic.cpp" #endif -- 2.11.4.GIT