|
Lines 1-57
Link Here
|
| 1 |
--- src/tools.c.orig 2010-01-11 15:48:46.000000000 +0300 |
|
|
| 2 |
+++ src/tools.c 2010-01-11 15:53:42.000000000 +0300 |
| 3 |
@@ -30,7 +30,10 @@ |
| 4 |
#include <fcntl.h> |
| 5 |
#include <sys/types.h> |
| 6 |
#include <dirent.h> |
| 7 |
+ |
| 8 |
+#ifndef WITHOUT_XATTR |
| 9 |
#include <attr/xattr.h> |
| 10 |
+#endif |
| 11 |
|
| 12 |
#include "tools.h" |
| 13 |
#include "debug.h" |
| 14 |
@@ -262,11 +265,13 @@ |
| 15 |
ftime.modtime = st.st_mtime; |
| 16 |
utime(to, &ftime); |
| 17 |
|
| 18 |
+#ifndef WITHOUT_XATTR |
| 19 |
// extended attributes |
| 20 |
if (copy_xattrs(from, to) == -1) |
| 21 |
mhdd_debug(MHDD_MSG, |
| 22 |
"copy_xattrs: error copying xattrs from %s to %s\n", |
| 23 |
from, to); |
| 24 |
+#endif |
| 25 |
|
| 26 |
|
| 27 |
from = strdup(from); |
| 28 |
@@ -282,6 +287,7 @@ |
| 29 |
return ret; |
| 30 |
} |
| 31 |
|
| 32 |
+#ifndef WITHOUT_XATTR |
| 33 |
int copy_xattrs(const char *from, const char *to) |
| 34 |
{ |
| 35 |
int listsize=0, attrvalsize=0; |
| 36 |
@@ -350,6 +356,7 @@ |
| 37 |
free(listbuf); |
| 38 |
return 0; |
| 39 |
} |
| 40 |
+#endif |
| 41 |
|
| 42 |
char * create_path(const char *dir, const char * file) |
| 43 |
{ |
| 44 |
@@ -465,11 +472,13 @@ |
| 45 |
strerror(errno)); |
| 46 |
} |
| 47 |
|
| 48 |
+#ifndef WITHOUT_XATTR |
| 49 |
// copy extended attributes of parent dir |
| 50 |
if (copy_xattrs(exists, path_parent) == -1) |
| 51 |
mhdd_debug(MHDD_MSG, |
| 52 |
"copy_xattrs: error copying xattrs from %s to %s\n", |
| 53 |
exists, path_parent); |
| 54 |
+#endif |
| 55 |
|
| 56 |
free(exists); |
| 57 |
free(path_parent); |