blob: 7c96fc406203e79d376c3ba55caa134be8ac0b8f [file] [log] [blame]
// Copyright 2013 Google Inc. All Rights Reserved.
#include <errno.h>
#include <irt_syscalls.h>
#include <nacl_fcntl.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdlib.h>
int getdents(int desc, struct dirent *buf, size_t count) {
size_t nread;
int error = __nacl_irt_getdents(desc, buf, count, &nread);
if (error) {
errno = error;
return -1;
}
return nread;
}