summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornia <nia@NetBSD.org>2022-12-28 11:51:21 +0000
committernia <nia@NetBSD.org>2022-12-28 11:51:21 +0000
commitab696e6e98a251b6ef4327f2f4c27f3e677b111d (patch)
tree9ddda3e17373500bbe29e72aaf6069376df51658 /include
parent8abe1f2217127350bb1718a398a3b6a352a810da (diff)
scandir(3) and alphasort(3) are part of POSIX-2008, so don't require
_NETBSD_SOURCE to use them.
Diffstat (limited to 'include')
-rw-r--r--include/dirent.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/dirent.h b/include/dirent.h
index c6a96f592e3..fde1e324a8c 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -1,4 +1,4 @@
-/* $NetBSD: dirent.h,v 1.37 2021/12/30 16:20:19 nros Exp $ */
+/* $NetBSD: dirent.h,v 1.38 2022/12/28 11:51:21 nia Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -108,19 +108,19 @@ long telldir(DIR *);
defined(_NETBSD_SOURCE)
#ifndef __LIBC12_SOURCE__
DIR *fdopendir(int);
-#endif
-#endif
-#if defined(_NETBSD_SOURCE)
-#ifndef __LIBC12_SOURCE__
-DIR *__opendir2(const char *, int) __RENAME(__opendir230);
int scandir(const char *, struct dirent ***,
int (*)(const struct dirent *), int (*)(const struct dirent **,
const struct dirent **))
__RENAME(__scandir30);
-int getdents(int, char *, size_t) __RENAME(__getdents30);
int alphasort(const struct dirent **, const struct dirent **)
__RENAME(__alphasort30);
#endif
+#endif
+#if defined(_NETBSD_SOURCE)
+#ifndef __LIBC12_SOURCE__
+DIR *__opendir2(const char *, int) __RENAME(__opendir230);
+int getdents(int, char *, size_t) __RENAME(__getdents30);
+#endif
#endif /* defined(_NETBSD_SOURCE) */
__END_DECLS