summaryrefslogtreecommitdiff
path: root/lib/common/BoxPlatform.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/BoxPlatform.h')
-rw-r--r--lib/common/BoxPlatform.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h
index 1c94cf73..c4739b3b 100644
--- a/lib/common/BoxPlatform.h
+++ b/lib/common/BoxPlatform.h
@@ -1,11 +1,12 @@
-// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
+// distribution boxbackup-0.11rc2 (svn version: 2072)
//
-// Copyright (c) 2003 - 2006
+// Copyright (c) 2003 - 2008
// Ben Summers and contributors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
+//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
@@ -207,8 +208,14 @@
// We cannot define macros with arguments directly using AC_DEFINE,
// so do it here instead of in configure.ac.
-#ifndef HAVE_DECL_DIRFD
- #define dirfd(x) (x)->d_fd
+#if ! HAVE_DECL_DIRFD
+ #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