#include <assert.h>
#include <sys/types.h>
+#if HAVE_HURD_H
+# include <hurd.h>
+#endif
+
#include "system.h"
#include "error.h"
#include "backupfile.h"
}
}
+#if HAVE_STRUCT_STAT_ST_AUTHOR
+ /* Preserve the st_author field. */
+ {
+ file_t file = getdport (dst_path);
+ if (file_chauthor (file, src_sb.st_author))
+ error (0, errno, _("preserving authorship for %s"), quote (dst_path));
+ mach_port_deallocate (mach_task_self (), file);
+ }
+#endif
+
/* Permissions of newly-created regular files were set upon `open' in
copy_reg. But don't return early if there were any special bits and
we had to run chown, because the chown must have reset those bits. */