diff options
-rw-r--r-- | infrastructure/m4/boxbackup_tests.m4 | 4 | ||||
-rw-r--r-- | lib/backupstore/BackupClientFileAttributes.cpp | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/infrastructure/m4/boxbackup_tests.m4 b/infrastructure/m4/boxbackup_tests.m4 index 0f46a78c..7248a74b 100644 --- a/infrastructure/m4/boxbackup_tests.m4 +++ b/infrastructure/m4/boxbackup_tests.m4 @@ -203,9 +203,11 @@ AC_CHECK_MEMBERS([DIR.d_fd],,, [[#include <dirent.h>]]) AC_CHECK_MEMBERS([DIR.dd_fd],,, [[#include <dirent.h>]]) AC_CHECK_MEMBERS([struct tcp_info.tcpi_rtt],,, [[#include <netinet/tcp.h>]]) +AC_CHECK_DECLS([O_BINARY]) + +AC_CHECK_DECLS([ENOTSUP],,, [[#include <sys/errno.h>]]) AC_CHECK_DECLS([INFTIM],,, [[#include <poll.h>]]) AC_CHECK_DECLS([SO_PEERCRED],,, [[#include <sys/socket.h>]]) -AC_CHECK_DECLS([O_BINARY],,,) AC_CHECK_DECLS([SOL_TCP],,, [[#include <netinet/tcp.h>]]) AC_CHECK_DECLS([TCP_INFO],,, [[#include <netinet/tcp.h>]]) diff --git a/lib/backupstore/BackupClientFileAttributes.cpp b/lib/backupstore/BackupClientFileAttributes.cpp index 53215b7c..e331e107 100644 --- a/lib/backupstore/BackupClientFileAttributes.cpp +++ b/lib/backupstore/BackupClientFileAttributes.cpp @@ -654,9 +654,18 @@ void BackupClientFileAttributes::FillExtendedAttr(StreamableMemBlock &outputBloc } else if(listSize<0) { - if(errno == EOPNOTSUPP || errno == EACCES) + if(errno == EOPNOTSUPP || errno == EACCES +#if HAVE_DECL_ENOTSUP + // NetBSD uses ENOTSUP instead + // https://mail-index.netbsd.org/tech-kern/2011/12/13/msg012185.html + || errno == ENOTSUP +#endif + ) { - // fail silently + // Not supported by OS, or not on this filesystem + BOX_TRACE(BOX_SYS_ERRNO_MESSAGE(errno, + BOX_FILE_MESSAGE(Filename, "Failed to " + "list extended attributes"))); } else if(errno == ERANGE) { @@ -673,7 +682,7 @@ void BackupClientFileAttributes::FillExtendedAttr(StreamableMemBlock &outputBloc else { THROW_SYS_FILE_ERROR("Failed to list extended " - "attributes, skipping them", Filename, + "attributes for unknown reason", Filename, CommonException, OSFileError); } } |