check_plausibility() works with files > 2GB.
+2001-11-13 Theodore Tso <tytso@valinux.com>
+
+ * util.c (check_plausibility): Use stat64 if available so that
+ check_plausibility() works with files > 2GB.
+
2001-11-05 Theodore Tso <tytso@valinux.com>
* chattr.1.in: Update the man page to document the EXT2_NOTAIL_FL
* %End-Header%
*/
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
#include <stdio.h>
#include <string.h>
#ifdef HAVE_ERRNO_H
void check_plausibility(const char *device)
{
int val;
+#ifdef HAVE_OPEN64
+ struct stat64 s;
+
+ val = stat64(device, &s);
+#else
struct stat s;
val = stat(device, &s);
+#endif
if(val == -1) {
fprintf(stderr, _("Could not stat %s --- %s\n"),