diff --git a/headers/posix/dirent.h b/headers/posix/dirent.h index f915c5abfc..991adf18d9 100644 --- a/headers/posix/dirent.h +++ b/headers/posix/dirent.h @@ -40,6 +40,9 @@ void rewinddir(DIR *dir); void seekdir(DIR *dir, long int loc); long int telldir(DIR *); +/* Non-POSIX extension to get the FD out of the private DIR */ +int dirfd(DIR *dir); + #ifdef __cplusplus } #endif diff --git a/src/system/libroot/posix/dirent.c b/src/system/libroot/posix/dirent.c index 929c4d4fb0..025d6fb22e 100644 --- a/src/system/libroot/posix/dirent.c +++ b/src/system/libroot/posix/dirent.c @@ -120,18 +120,8 @@ rewinddir(DIR *dir) } -#ifndef _KERNEL_MODE - -/* This is no POSIX compatible call; it's not exported in the headers - * but here for BeOS compatiblity. - */ - -int dirfd(DIR *dir); - int dirfd(DIR *dir) { return dir->fd; } - -#endif // !_KERNEL_MODE