diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index d3a41df50..3c85a12a6 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -143,8 +143,10 @@ utimensat(int fd, const char *path, const struct timespec times[2], # ifndef HAVE_FUTIMES return utimes(path, tv); # else +# ifdef O_NOFOLLOW if (flag & AT_SYMLINK_NOFOLLOW) oflags |= O_NOFOLLOW; +# endif /* O_NOFOLLOW */ if ((fd = open(path, oflags)) == -1) return -1; ret = futimes(fd, tv);