diff options
Diffstat (limited to 'ports/unix/guts/closedir.c')
-rw-r--r-- | ports/unix/guts/closedir.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ports/unix/guts/closedir.c b/ports/unix/guts/closedir.c new file mode 100644 index 0000000..1085361 --- /dev/null +++ b/ports/unix/guts/closedir.c @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2012 Wind River Systems; see + * guts/COPYRIGHT for information. + * + * static int + * wrap_closedir(DIR *dirp) { + * int rc = -1; + */ + if (!dirp) { + errno = EFAULT; + return -1; + } + + int fd = dirfd(dirp); + pseudo_client_op(OP_CLOSE, 0, fd, -1, 0, 0); + rc = real_closedir(dirp); + +/* return rc; + * } + */ |