summaryrefslogtreecommitdiff
path: root/lib/intercept/intercept.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-09-26 20:24:11 +0000
committerChris Wilson <chris+github@qwirx.com>2008-09-26 20:24:11 +0000
commit4bb33be645a37da5af0f27b3593985148e366388 (patch)
tree99275778f7320baf2de95ebd87a666e2d680dccb /lib/intercept/intercept.h
parente40140f8af64b1ddf5941182b0d367eeb6567fcf (diff)
Fix compilation of open64() intercept.
Diffstat (limited to 'lib/intercept/intercept.h')
-rw-r--r--lib/intercept/intercept.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/intercept/intercept.h b/lib/intercept/intercept.h
index 4722179d..66e8684b 100644
--- a/lib/intercept/intercept.h
+++ b/lib/intercept/intercept.h
@@ -23,14 +23,17 @@ extern "C"
typedef struct dirent *(readdir_t) (DIR *dir);
typedef int (closedir_t)(DIR *dir);
#if defined __GNUC__ && __GNUC__ >= 2
-#define LINUX_WEIRD_LSTAT
-#define STAT_STRUCT struct stat /* should be stat64 */
- typedef int (lstat_t) (int ver, const char *file_name,
- STAT_STRUCT *buf);
+ #if _FILE_OFFSET_BITS == 64
+ #define DEFINE_ONLY_OPEN64
+ #endif
+ #define LINUX_WEIRD_LSTAT
+ #define STAT_STRUCT struct stat /* should be stat64 */
+ typedef int (lstat_t) (int ver, const char *file_name,
+ STAT_STRUCT *buf);
#else
-#define STAT_STRUCT struct stat
- typedef int (lstat_t) (const char *file_name,
- STAT_STRUCT *buf);
+ #define STAT_STRUCT struct stat
+ typedef int (lstat_t) (const char *file_name,
+ STAT_STRUCT *buf);
#endif
}