]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Since it's unused, make dirfd() take void *.
authorDarren Tucker <dtucker@dtucker.net>
Thu, 8 May 2025 08:56:39 +0000 (18:56 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Thu, 8 May 2025 08:56:39 +0000 (18:56 +1000)
Some platforms (eg Old BSDs) in some configurations define DIR to "void
*", which causes compile errors in the no-op implementation.

openbsd-compat/bsd-misc.c
openbsd-compat/bsd-misc.h

index 09bbb6049cacecad0244f4b1abb9992987e66e6d..669d2bb7e2734a80297a22497d3ba10f41889c71 100644 (file)
@@ -160,7 +160,7 @@ utimensat(int fd, const char *path, const struct timespec times[2],
 
 #ifndef HAVE_DIRFD
 int
-dirfd(DIR *dir)
+dirfd(void *dir)
 {
        errno = ENOSYS;
        return -1;
index 4ac73c73ee274805e1ee7446f0601c8a78266a2d..d237256d45fca70e91c5bb9fbe4cbba49c756f71 100644 (file)
@@ -66,9 +66,7 @@ int utimes(const char *, struct timeval *);
 #endif /* HAVE_UTIMES */
 
 #ifndef HAVE_DIRFD
-#include <sys/types.h>
-#include <dirent.h>
-int dirfd(DIR *);
+int dirfd(void *);
 #endif
 
 #ifndef AT_FDCWD