Changed "statx" to "stat_x" to try to work around a build problem on AIX.
[rsync/rsync.git] / xattrs.c
index 48a630f..50748b4 100644 (file)
--- a/xattrs.c
+++ b/xattrs.c
@@ -6,8 +6,9 @@
  * Copyright (C) 2006, 2007 Wayne Davison
  *
  * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ * with this program; if not, visit the http://fsf.org website.
  */
 
 #include "rsync.h"
+#include "ifuncs.h"
 #include "lib/sysxattrs.h"
 
 #ifdef SUPPORT_XATTRS
@@ -89,7 +90,7 @@ static void rsync_xal_free(item_list *xalp)
        xalp->count = 0;
 }
 
-void free_xattr(statx *sxp)
+void free_xattr(stat_x *sxp)
 {
        if (!sxp->xattr)
                return;
@@ -267,7 +268,7 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
 }
 
 /* Read the xattr(s) for this filename. */
-int get_xattr(const char *fname, statx *sxp)
+int get_xattr(const char *fname, stat_x *sxp)
 {
        sxp->xattr = new(item_list);
        *sxp->xattr = empty_xattr;
@@ -329,7 +330,7 @@ static void rsync_xal_store(item_list *xalp)
 }
 
 /* Send the make_xattr()-generated xattr list for this flist entry. */
-int send_xattr(statx *sxp, int f)
+int send_xattr(stat_x *sxp, int f)
 {
        int ndx = find_matching_xattr(sxp->xattr);
 
@@ -375,7 +376,7 @@ int send_xattr(statx *sxp, int f)
 /* Return a flag indicating if we need to change a file's xattrs.  If
  * "find_all" is specified, also mark any abbreviated xattrs that we
  * need so that send_xattr_request() can tell the sender about them. */
-int xattr_diff(struct file_struct *file, statx *sxp, int find_all)
+int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
 {
        item_list *lst = rsync_xal_l.items;
        rsync_xa *snd_rxa, *rec_rxa;
@@ -656,9 +657,9 @@ void receive_xattr(struct file_struct *file, int f)
        F_XATTR(file) = ndx;
 }
 
-/* Turn the xattr data in statx into cached xattr data, setting the index
+/* Turn the xattr data in stat_x into cached xattr data, setting the index
  * values in the file struct. */
-void cache_xattr(struct file_struct *file, statx *sxp)
+void cache_xattr(struct file_struct *file, stat_x *sxp)
 {
        int ndx;
 
@@ -673,7 +674,7 @@ void cache_xattr(struct file_struct *file, statx *sxp)
 }
 
 static int rsync_xal_set(const char *fname, item_list *xalp,
-                        const char *fnamecmp, statx *sxp)
+                        const char *fnamecmp, stat_x *sxp)
 {
        rsync_xa *rxas = xalp->items;
        ssize_t list_len;
@@ -780,7 +781,7 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
 
 /* Set extended attributes on indicated filename. */
 int set_xattr(const char *fname, const struct file_struct *file,
-             const char *fnamecmp, statx *sxp)
+             const char *fnamecmp, stat_x *sxp)
 {
        int ndx;
        item_list *lst = rsync_xal_l.items;