From 3bb029868ac789bdc6cff8c39c18df30c177e194 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 18 Dec 2007 00:17:54 +0000 Subject: Search for readdir64 and stat64 if LARGE_FILE_SUPPORT is enabled, rather than relying on Linux redirection macros that aren't present on Slackware (which uses asm redirects instead). --- lib/intercept/intercept.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/intercept/intercept.cpp') diff --git a/lib/intercept/intercept.cpp b/lib/intercept/intercept.cpp index 44e9424d..a0c13521 100644 --- a/lib/intercept/intercept.cpp +++ b/lib/intercept/intercept.cpp @@ -457,7 +457,7 @@ struct dirent *readdir(DIR *dir) if (readdir_real == NULL) { - #if defined readdir && readdir == readdir64 + #ifdef HAVE_LARGE_FILE_SUPPORT readdir_real = (readdir_t*)find_function("readdir64"); #else readdir_real = (readdir_t*)find_function("readdir"); @@ -506,13 +506,13 @@ lstat(const char *file_name, STAT_STRUCT *buf) if (lstat_real == NULL) { #ifdef LINUX_WEIRD_LSTAT - #if defined __lxstat && __lxstat == __lxstat64 + #ifdef HAVE_LARGE_FILE_SUPPORT lstat_real = (lstat_t*)find_function("__lxstat64"); #else lstat_real = (lstat_t*)find_function("__lxstat"); #endif #else - #if defined lstat && lstat == lstat64 + #ifdef HAVE_LARGE_FILE_SUPPORT lstat_real = (lstat_t*)find_function("lstat64"); #else lstat_real = (lstat_t*)find_function("lstat"); -- cgit v1.2.3