]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/cmd/mktree/mktree.c
Update ZTS to work on FreeBSD
[mirror_zfs.git] / tests / zfs-tests / cmd / mktree / mktree.c
index 02d4974d783ffb8ad37ee5d82d73296e7e329b96..25b26c9e151bb03e8c8da27963f00de663d9f508 100644 (file)
@@ -30,7 +30,9 @@
 #include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
+#ifdef __linux__
 #include <sys/xattr.h>
+#endif
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/param.h>
@@ -176,11 +178,13 @@ crtfile(char *pname)
                exit(errno);
        }
 
+#ifdef __linux__
        if (fsetxattr(fd, "user.xattr", pbuf, 1024, 0) < 0) {
                (void) fprintf(stderr, "fsetxattr(fd, \"xattr\", pbuf, "
                    "1024, 0) failed.\n[%d]: %s.\n", errno, strerror(errno));
                exit(errno);
        }
+#endif
 
        (void) close(fd);
        free(pbuf);