That's what I meant by "glibc seems aware that getdents64() is the right syscall in both of those contexts".