linux: emulate utimensat() on pre-2.6.22 kernels #687

Closed
bnoordhuis opened this Issue Jan 17, 2013 · 1 comment

1 participant

@bnoordhuis

utimensat() was added in 2.6.22. Emulate it with utimes("/proc/self/fd/<fd>") instead.

Needs some special error handling:

  • EACCES and ENOTDIR become ENOSYS.
  • ENOENT becomes EBADF iff fcntl(fd, F_GETFL) sets EBADF, else ENOSYS

Ref #685.

@bnoordhuis bnoordhuis was assigned Jan 17, 2013
@bnoordhuis bnoordhuis added a commit that closed this issue Jan 17, 2013
@bnoordhuis bnoordhuis linux: add futimes() fallback
The utimensat() syscall was added in 2.6.22. Add a fallback mode for
older kernels that uses utimes("/proc/self/fd/<fd>").

Fixes #687.
9d4a16e
@bnoordhuis

Error conversion added in 372ac34.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment