From 752e801bd3235b4c1236c6a9ef396a01a0312b2a Mon Sep 17 00:00:00 2001 From: matthew <> Date: Thu, 22 Mar 2012 01:13:40 +0000 Subject: [PATCH] Add dirfd() as a function to libc per POSIX requirement; dirfd() macro to be pruned later when DIR is made an opaque type. ok guenther@; prodding by brad@ for VLC and other ports --- src/include/dirent.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/include/dirent.h b/src/include/dirent.h index 6e6cf55f..c59fc1e0 100644 --- a/src/include/dirent.h +++ b/src/include/dirent.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dirent.h,v 1.24 2011/07/18 17:29:49 matthew Exp $ */ +/* $OpenBSD: dirent.h,v 1.25 2012/03/22 01:13:40 matthew Exp $ */ /* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */ /*- @@ -119,6 +119,9 @@ int scandir(const char *, struct dirent ***, int (*)(struct dirent *), int (*)(const void *, const void *)); int alphasort(const void *, const void *); #endif +#if __POSIX_VISIBLE >= 200809 || __XPG_VISIBLE > 600 +int (dirfd)(DIR *); +#endif __END_DECLS #endif /* !_KERNEL */