aboutsummaryrefslogtreecommitdiff
path: root/src/util/disk.c
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-10-08 09:30:24 +0000
committerLRN <lrn1986@gmail.com>2013-10-08 09:30:24 +0000
commitfecec16a940ab10dd028385d09bf3c31c5f85739 (patch)
tree932cfca0d38bc1af0e9904bfa3e72f55224de5cb /src/util/disk.c
parent73bfdbd5294ec0e4f953e19c766920c0ae3b0737 (diff)
downloadgnunet-fecec16a940ab10dd028385d09bf3c31c5f85739.tar.gz
gnunet-fecec16a940ab10dd028385d09bf3c31c5f85739.zip
Tweak the stat-calling code
Diffstat (limited to 'src/util/disk.c')
-rw-r--r--src/util/disk.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/util/disk.c b/src/util/disk.c
index 69473a13d..652a45ed0 100644
--- a/src/util/disk.c
+++ b/src/util/disk.c
@@ -149,19 +149,17 @@ getSizeRec (void *cls, const char *fn)
149{ 149{
150 struct GetFileSizeData *gfsd = cls; 150 struct GetFileSizeData *gfsd = cls;
151 151
152#ifdef HAVE_STAT64 152#if defined (HAVE_STAT64) && !(defined (_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
153 struct stat64 buf; 153 STRUCT_STAT64 buf;
154#else
155 struct stat buf;
156#endif
157 154
158#ifdef HAVE_STAT64
159 if (0 != STAT64 (fn, &buf)) 155 if (0 != STAT64 (fn, &buf))
160 { 156 {
161 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_DEBUG, "stat64", fn); 157 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_DEBUG, "stat64", fn);
162 return GNUNET_SYSERR; 158 return GNUNET_SYSERR;
163 } 159 }
164#else 160#else
161 struct stat buf;
162
165 if (0 != STAT (fn, &buf)) 163 if (0 != STAT (fn, &buf))
166 { 164 {
167 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_DEBUG, "stat", fn); 165 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_DEBUG, "stat", fn);