From 2f156993495317477d92f02aa05c674cab8e3805 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 20 Jan 2006 21:17:38 +0000 Subject: . --- sysdeps/unix/fdopendir.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'sysdeps/unix') diff --git a/sysdeps/unix/fdopendir.c b/sysdeps/unix/fdopendir.c index b586e58ca4..528f180fcb 100644 --- a/sysdeps/unix/fdopendir.c +++ b/sysdeps/unix/fdopendir.c @@ -29,7 +29,6 @@ fdopendir (int fd) { struct stat64 statbuf; -#ifndef O_DIRECTORY if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &statbuf), 0) < 0) return NULL; if (__builtin_expect (! S_ISDIR (statbuf.st_mode), 0)) @@ -37,20 +36,11 @@ fdopendir (int fd) __set_errno (ENOTDIR); return NULL; } -#endif - /* Make sure the descriptor allows for reading (and eventually that - the descriptor is for a directory). */ + /* Make sure the descriptor allows for reading. */ int flags = __fcntl (fd, F_GETFL); if (__builtin_expect (flags == -1, 0)) return NULL; -#ifdef O_DIRECTORY - if (__builtin_expect ((flags & O_DIRECTORY) == 0, 0)) - { - __set_errno (ENOTDIR); - return NULL; - } -#endif if (__builtin_expect ((flags & O_ACCMODE) == O_WRONLY, 0)) { __set_errno (EINVAL); -- cgit v1.2.3-70-g09d2