From eaf71fbdb659656fd0fb429305051e64afb8cb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 17 Jul 2008 01:22:13 +0000 Subject: [PATCH] * Build fix: coreutils had a replacement for dirfd(). * Made DIR argument const in dirfd(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26469 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/dirent.h | 2 +- src/bin/coreutils/lib/config.h | 6 +++--- src/system/libroot/posix/dirent.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/headers/posix/dirent.h b/headers/posix/dirent.h index 991adf18d9..354aa1c334 100644 --- a/headers/posix/dirent.h +++ b/headers/posix/dirent.h @@ -41,7 +41,7 @@ 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); +int dirfd(const DIR *dir); #ifdef __cplusplus } diff --git a/src/bin/coreutils/lib/config.h b/src/bin/coreutils/lib/config.h index 26a555ffd2..6836262ddc 100644 --- a/src/bin/coreutils/lib/config.h +++ b/src/bin/coreutils/lib/config.h @@ -262,7 +262,7 @@ /* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't. */ -#define HAVE_DECL_DIRFD 0 +#define HAVE_DECL_DIRFD 1 /* Define to 1 if you have the declaration of `euidaccess', and to 0 if you don't. */ @@ -1560,7 +1560,7 @@ /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ -#define SIG_ATOMIC_T_SUFFIX +#define SIG_ATOMIC_T_SUFFIX /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ @@ -1665,7 +1665,7 @@ /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ -#define WCHAR_T_SUFFIX +#define WCHAR_T_SUFFIX /* Define if sys/ptem.h is required for struct winsize. */ /* #undef WINSIZE_IN_PTEM */ diff --git a/src/system/libroot/posix/dirent.c b/src/system/libroot/posix/dirent.c index 025d6fb22e..5274d9e246 100644 --- a/src/system/libroot/posix/dirent.c +++ b/src/system/libroot/posix/dirent.c @@ -121,7 +121,7 @@ rewinddir(DIR *dir) int -dirfd(DIR *dir) +dirfd(const DIR *dir) { return dir->fd; }