Make dirfd() publically available. It used on other systems as well it seems.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26466 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -40,6 +40,9 @@ void rewinddir(DIR *dir);
|
|||||||
void seekdir(DIR *dir, long int loc);
|
void seekdir(DIR *dir, long int loc);
|
||||||
long int telldir(DIR *);
|
long int telldir(DIR *);
|
||||||
|
|
||||||
|
/* Non-POSIX extension to get the FD out of the private DIR */
|
||||||
|
int dirfd(DIR *dir);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -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
|
int
|
||||||
dirfd(DIR *dir)
|
dirfd(DIR *dir)
|
||||||
{
|
{
|
||||||
return dir->fd;
|
return dir->fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !_KERNEL_MODE
|
|
||||||
|
|||||||
Reference in New Issue
Block a user