diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-01-22 01:00:12 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-01-22 01:00:12 +0000 |
commit | c10a73a1812e4885f3b84992277606dee85710cb (patch) | |
tree | 5bb475682005c323fce5641d865b88360f969266 /lib | |
parent | cede082dc35481d4d47d389f56d9f406999d35d0 (diff) |
Detect whether struct DIR has d_fd or dd_fd member and define the
dirfd() macro accordingly.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common/BoxPlatform.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h index af595e04..2f0096aa 100644 --- a/lib/common/BoxPlatform.h +++ b/lib/common/BoxPlatform.h @@ -170,7 +170,13 @@ // so do it here instead of in configure.ac. #if ! HAVE_DECL_DIRFD - #define dirfd(x) (x)->d_fd + #ifdef HAVE_DIR_D_FD + #define dirfd(x) (x)->d_fd + #elif defined HAVE_DIR_DD_FD + #define dirfd(x) (x)->dd_fd + #else + #error No way to get file descriptor from DIR structure + #endif #endif #endif // BOXPLATFORM__H |