faccessat() fails on some cases; in particular when:

  • flags does not have AT_EACCESS
  • dirfd is not AT_FDCWD
  • pathname is not an absolute path

In such case, it will return -1 setting ENOTSUP as errno.

faccessat.c