At least NetBSD 6 has partial support for utimensat, implementing the
function but not providing needed definitions via sys/stat.h as POSIX
requires. Check for needed defines, and if missing, undefine
HAVE_UTIMENSAT.
Signed-Off-By: Greg Troxel <gdt@ir.bbn.com>
Tested-By: Greg Troxel <gdt@ir.bbn.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
#define BUP_HAVE_FILE_ATTRS 1
#endif
+/*
+ * Check for incomplete UTIMENSAT support (NetBSD 6), and if so,
+ * pretend we don't have it.
+ */
+#if !defined(AT_FDCWD) || !defined(AT_SYMLINK_NOFOLLOW)
+#undef HAVE_UTIMENSAT
+#endif
+
#ifndef FS_NOCOW_FL
// Of course, this assumes it's a bitfield value.
#define FS_NOCOW_FL 0