From 8fbfb0b973b1ff8307f7c29e6e8facb7e0f72ea0 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 17 May 2024 17:58:27 -0400 Subject: dir: Add support for posix_getdents() This will be added to the next POSIX standard, and is already implemented in musl. Link: https://www.austingroupbugs.net/view.php?id=697 Link: https://git.musl-libc.org/cgit/musl/commit/?id=1b0d48517f816e98f19111df82f32bfc1608ecec --- build/has/posix-getdents.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 build/has/posix-getdents.c (limited to 'build/has/posix-getdents.c') diff --git a/build/has/posix-getdents.c b/build/has/posix-getdents.c new file mode 100644 index 0000000..f74bbe5 --- /dev/null +++ b/build/has/posix-getdents.c @@ -0,0 +1,9 @@ +// Copyright © Tavian Barnes +// SPDX-License-Identifier: 0BSD + +#include + +int main(void) { + char buf[1024]; + return posix_getdents(3, (void *)buf, sizeof(buf), 0); +} -- cgit v1.2.3