ChangeLog, chattr.c, lsattr.c:
  chattr.c, lsattr.c: Don't use _FILE_BITS_OFFSET method of using the
  	64-bit function, since this changes the expected size of struct
  	dirent.  Instead use lseek64 explicitly.

diff --git a/misc/lsattr.c b/misc/lsattr.c
index 6b5a8eb..2d8de69 100644
--- a/misc/lsattr.c
+++ b/misc/lsattr.c
@@ -18,7 +18,6 @@
  */
 
 #define _LARGEFILE64_SOURCE
-#define _FILE_OFFSET_BITS 64
 
 #include <sys/types.h>
 #include <dirent.h>
@@ -55,6 +54,14 @@
 static int verbose;
 static int generation_opt;
 
+#ifdef _LFS64_LARGEFILE
+#define LSTAT		lstat64
+#define STRUCT_STAT	struct stat64
+#else
+#define LSTAT		lstat
+#define STRUCT_STAT	struct stat
+#endif
+
 static void usage(void)
 {
 	fprintf(stderr, _("Usage: %s [-RVadlv] [files...]\n"), program_name);
@@ -94,9 +101,9 @@
 
 static void lsattr_args (const char * name)
 {
-	struct stat st;
+	STRUCT_STAT	st;
 
-	if (lstat (name, &st) == -1)
+	if (LSTAT (name, &st) == -1)
 		com_err (program_name, errno, _("while trying to stat %s"),
 			 name);
 	else {
@@ -109,13 +116,13 @@
 
 static int lsattr_dir_proc (const char * dir_name, struct dirent * de, void * private)
 {
-	struct stat st;
+	STRUCT_STAT	st;
 	char *path;
 
 	path = malloc(strlen (dir_name) + 1 + strlen (de->d_name) + 1);
 
 	sprintf (path, "%s/%s", dir_name, de->d_name);
-	if (lstat (path, &st) == -1)
+	if (LSTAT (path, &st) == -1)
 		perror (path);
 	else {
 		if (de->d_name[0] != '.' || all) {