[phodav: 1/2] build: use <sys/xattr.h> instead of <attr/xattr.h>



commit ae12abb0123af6b7e3b35b3d87aba4c12992a1c8
Author: Jakub Janků <jjanku redhat com>
Date:   Sat Mar 21 20:16:30 2020 +0100

    build: use <sys/xattr.h> instead of <attr/xattr.h>
    
    xattr.h has been removed upstream in libattr
    in favour of <sys/xattr.h>
    
    Fixes: https://gitlab.gnome.org/GNOME/phodav/issues/8
    
    Signed-off-by: Jakub Janků <jjanku redhat com>

 libphodav/phodav-method-proppatch.c | 10 +++++-----
 meson.build                         |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/libphodav/phodav-method-proppatch.c b/libphodav/phodav-method-proppatch.c
index 5c1f2dd..ad8c683 100644
--- a/libphodav/phodav-method-proppatch.c
+++ b/libphodav/phodav-method-proppatch.c
@@ -21,8 +21,8 @@
 #include "phodav-utils.h"
 
 #include <sys/types.h>
-#ifdef HAVE_ATTR_XATTR_H
-#include <attr/xattr.h>
+#ifdef HAVE_SYS_XATTR_H
+#include <sys/xattr.h>
 #endif
 
 
@@ -50,12 +50,12 @@ set_attr (GFile *file, xmlNodePtr attrnode,
       attrname = xml_node_get_xattr_name (attrnode, "user.");
       g_return_val_if_fail (attrname, SOUP_STATUS_BAD_REQUEST);
 
-      /* https://bugzilla.gnome.org/show_bug.cgi?id=720506 */
+      /* https://gitlab.gnome.org/GNOME/glib/issues/1187 */
       gchar *path = g_file_get_path (file);
-#ifdef HAVE_ATTR_XATTR_H
+#ifdef HAVE_SYS_XATTR_H
       removexattr (path, attrname);
 #else
-      g_debug ("fixme");
+      g_debug ("cannot remove xattr from %s, not supported", path); /* FIXME? */
 #endif
       g_free (path);
     }
diff --git a/meson.build b/meson.build
index 184b186..de026e7 100644
--- a/meson.build
+++ b/meson.build
@@ -45,8 +45,8 @@ if d1.found() and d2.found()
   conf.set('WITH_AVAHI', 1)
 endif
 
-if compiler.has_header('attr/xattr.h')
-  conf.set('HAVE_ATTR_XATTR_H', 1)
+if compiler.has_header('sys/xattr.h')
+  conf.set('HAVE_SYS_XATTR_H', 1)
 endif
 
 subdir('po')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]