Simply rename statvfs64 to statfs with a #define.
OSX version of statvfs is missing some members, so if the renaming
is in effect (stavfs64 is defined), don't try to use them and go
directly for the other member value.
Signed-off-by: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fname, strerror(errno));
return -1;
}
+#ifndef statvfs64
bsize = vfss.f_frsize ? vfss.f_frsize : vfss.f_bsize;
+#else
+ bsize = vfss.f_bsize;
+#endif
if (statp->bs_blksize * statp->bs_blocks >
vfss.f_bfree * bsize - minimumfree) {
fsrprintf(_("insufficient freespace for: %s: "
close(fd);
return -1;
}
+#ifndef statvfs64
bsize = (sfbp->f_frsize ? sfbp->f_frsize : sfbp->f_bsize);
+#else
+ bsize = sfbp->f_bsize;
+#endif
factor = fsgeom.blocksize / bsize; /* currently this is == 1 */
sfbp->f_bfree = (cnt.freertx * fsgeom.rtextsize) * factor;
return 0;
endif
ifeq ($(PKG_PLATFORM),darwin)
PCFLAGS = $(GCCFLAGS)
-DEPENDFLAGS = -D__APPLE__
+DEPENDFLAGS = -D__APPLE__ -D_DARWIN_FEATURE_64_BIT_INODE
endif
ifeq ($(PKG_PLATFORM),irix)
PLDLIBS = -ldisk -lgen
return getitimer(ITIMER_REAL, value);
}
+/* FSR */
+
+#define statvfs64 statfs
+#define _PATH_MOUNTED "/etc/mtab"
+
#endif /* __XFS_DARWIN_H__ */