From: Eric Biggers Date: Sat, 18 Mar 2023 07:17:54 +0000 (-0700) Subject: Make the 'tree-cmp' program build on macOS X-Git-Tag: v1.14.0~86 X-Git-Url: https://wimlib.net/git/?a=commitdiff_plain;h=d93f55c529d2e631264546fe7037fdf23090f256;p=wimlib Make the 'tree-cmp' program build on macOS --- diff --git a/tests/tree-cmp.c b/tests/tree-cmp.c index 4b70a830..674b4b0f 100644 --- a/tests/tree-cmp.c +++ b/tests/tree-cmp.c @@ -28,7 +28,7 @@ #include #include #include -#ifdef HAVE_SYS_XATTR_H +#ifdef __linux__ # include #endif #include @@ -170,7 +170,7 @@ static void cmp(const char *file1, const char *file2, size_t size) close(fd2); } -#ifdef HAVE_SYS_XATTR_H +#ifdef __linux__ /* 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, @@ -275,13 +275,13 @@ static void cmp_ads(const char *file1, const char *file2) free(list2); } } -#endif /* HAVE_SYS_XATTR_H */ +#endif /* __linux__ */ /* Compares special NTFS data of the files, as accessed through extended * attributes. */ static void special_cmp(const char *file1, const char *file2) { -#ifdef HAVE_SYS_XATTR_H +#ifdef __linux__ 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);