From b1fa95721bd54c60c367ae4fb54279404656a070 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 13 Feb 2014 01:50:59 -0500 Subject: new: Detect dirent.d_type support at configure time Support for dirent.d_type is OS-specific. Previously, we used _DIRENT_HAVE_D_TYPE to detect support for this, but this is apparently a glic-ism (FreeBSD, for example, supports d_type, but does not define this). Since there's no cross-platform way to detect support for dirent.d_type, detect it using a test compile at configure time. --- compat/have_d_type.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 compat/have_d_type.c (limited to 'compat') diff --git a/compat/have_d_type.c b/compat/have_d_type.c new file mode 100644 index 00000000..9ca6c6e0 --- /dev/null +++ b/compat/have_d_type.c @@ -0,0 +1,10 @@ +#include + +int main() +{ + struct dirent ent; + + (void) ent.d_type; + + return 0; +} -- cgit v1.2.3