aboutsummaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2014-02-13 01:50:59 -0500
committerGravatar David Bremner <david@tethera.net>2014-02-14 08:42:45 -0400
commitb1fa95721bd54c60c367ae4fb54279404656a070 (patch)
tree18c95afc973ea0bbc0a1ba8f88a918e85b72b9e3 /compat
parentaaa7f0d92ee9c876c38da43be5c49e8d5c73a99b (diff)
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.
Diffstat (limited to 'compat')
-rw-r--r--compat/have_d_type.c10
1 files changed, 10 insertions, 0 deletions
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 <dirent.h>
+
+int main()
+{
+ struct dirent ent;
+
+ (void) ent.d_type;
+
+ return 0;
+}