#define DIR_DOT_OR_DOTDOT(a) \
((strcmp(a, ".") == 0) || (strcmp(a, "..") == 0))
+#ifndef TIMESPEC_TO_TIMEVAL
+#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
+ (tv)->tv_sec = (ts)->tv_sec; \
+ (tv)->tv_usec = (ts)->tv_nsec / 1000; \
+ }
+#endif
+
enum logtype {STD, DBG};
#define SLOG(...) \
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <libgen.h>
#include <atalk/ftw.h>
#include <atalk/adouble.h>
TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim);
TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim);
- if (islink ? lutimes(to.p_path, tv) : utimes(to.p_path, tv)) {
- SLOG("%sutimes: %s", islink ? "l" : "", to.p_path);
+ if (utimes(to.p_path, tv)) {
+ SLOG("utimes: %s", to.p_path);
rval = 1;
}
if (fdval ? fstat(fd, &ts) :