X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=tests%2Ftree-cmp.c;h=1fed0234cccbd07044364ec07cadea53e25117ba;hp=b6051ccb90f5df99b7a8154dea636e281e74d6ab;hb=139f42ea23511d81a44e8925a24f7f218318010c;hpb=4ac0a4105886f5d8a56ee3feacaaa19562d89e6a diff --git a/tests/tree-cmp.c b/tests/tree-cmp.c index b6051ccb..1fed0234 100644 --- a/tests/tree-cmp.c +++ b/tests/tree-cmp.c @@ -27,11 +27,16 @@ #include #include #include -#ifdef HAVE_ATTR_XATTR_H -#include +#include +#ifdef HAVE_SYS_XATTR_H +# include #endif #include +#ifndef ENOATTR +# define ENOATTR ENODATA +#endif + typedef uint64_t u64; #if 0 @@ -165,7 +170,7 @@ static void cmp(const char *file1, const char *file2, size_t size) close(fd2); } -#ifdef HAVE_ATTR_XATTR_H +#ifdef HAVE_SYS_XATTR_H /* Compares an extended attribute of the files. */ static void cmp_xattr(const char *file1, const char *file2, const char *xattr_name, ssize_t max_size, @@ -270,13 +275,13 @@ static void cmp_ads(const char *file1, const char *file2) free(list2); } } -#endif +#endif /* HAVE_SYS_XATTR_H */ /* Compares special NTFS data of the files, as accessed through extended * attributes. */ static void special_cmp(const char *file1, const char *file2) { -#ifdef HAVE_ATTR_XATTR_H +#ifdef HAVE_SYS_XATTR_H cmp_xattr(file1, file2, "system.ntfs_acl", 0, false); cmp_xattr(file1, file2, "system.ntfs_attrib", 0, false); cmp_xattr(file1, file2, "system.ntfs_dos_name", 0, true); @@ -287,7 +292,7 @@ static void special_cmp(const char *file1, const char *file2) #else fprintf(stderr, "tree-cmp: Warning: cannot compare xattrs of `%s' and `%s'\n", file1, file2); - fprintf(stderr, " You need to install the attr development files for this.\n"); + fprintf(stderr, " Extended attributes are not supported on this platform.\n"); #endif }