fix linux

This commit is contained in:
Kelvin W Sherlock 2016-11-18 16:44:25 -05:00
parent 0b6ee991e1
commit 35d1946216
1 changed files with 4 additions and 1 deletions

View File

@ -26,6 +26,9 @@
#include "mapped_file.h"
#include "defer.h"
#ifdef __linux__
#include <attr/xattr.h>
#endif
std::vector<std::string> unlink_list;
@ -162,7 +165,7 @@ void one_file(const std::string &data, const std::string &rsrc) noexcept try {
if (ok < 0) throw_errno("com.apple.ResourceFork");
#endif
#ifdef ___linux____
#ifdef __linux__
int ok = fsetxattr(fd, "user.apple.ResourceFork", mf.data() + e.entryOffset, e.entryLength, 0);
if (ok < 0) throw_errno("user.apple.ResourceFork");
#endif