From cd10ccf4d1b4671883a0d45f6769947a6cdb45d0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 10:55:47 +0200 Subject: Adding upstream version 1.24.5. Signed-off-by: Daniel Baumann --- lib/fdopendir.c | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) (limited to 'lib/fdopendir.c') diff --git a/lib/fdopendir.c b/lib/fdopendir.c index 0f43d6f..bdbb2ea 100644 --- a/lib/fdopendir.c +++ b/lib/fdopendir.c @@ -1,5 +1,5 @@ /* provide a replacement fdopendir function - Copyright (C) 2004-2023 Free Software Foundation, Inc. + Copyright (C) 2004-2024 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,42 +44,6 @@ fdopendir (int fd) return dirp; } -# elif defined __KLIBC__ - -# include - -DIR * -fdopendir (int fd) -{ - char path[_MAX_PATH]; - DIR *dirp; - - /* Get a path from fd */ - if (__libc_Back_ioFHToPath (fd, path, sizeof (path))) - return NULL; - - dirp = opendir (path); - if (!dirp) - return NULL; - - /* Unregister fd registered by opendir() */ - _gl_unregister_dirp_fd (dirfd (dirp)); - - /* Register our fd */ - if (_gl_register_dirp_fd (fd, dirp)) - { - int saved_errno = errno; - - closedir (dirp); - - errno = saved_errno; - - dirp = NULL; - } - - return dirp; -} - # else /* We are not in control of the file descriptor of a DIR, and therefore have to play tricks with file descriptors before and after a call to opendir(). */ -- cgit v1.2.3