#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>
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);