summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Youngman <jay@gnu.org>2011-05-15 22:30:13 +0100
committerJames Youngman <jay@gnu.org>2011-05-15 22:30:13 +0100
commit553651bea517574adf48d73b300645ebb6550e0b (patch)
tree3b0e7eaf684ea7986c2ec674e1a0425f090275e6
parent9e15f9cdcb15a3bb91f24ad688a5e303731c3194 (diff)
downloadfindutils-553651bea517574adf48d73b300645ebb6550e0b.tar.gz
Fix Savannah bug #18227 (-ls doesn't print device major/minor).
* lib/listfile.c (list_file): check HAVE_STRUCT_STAT_ST_RDEV instead of HAVE_ST_RDEV, fixing this bug. HAVE_ST_RDEV was defined by the obsolete Autoconf macro AC_STRUCT_ST_RDEV, but findutils hasn't actually called AC_STRUCT_ST_RDEV since Apr 5 2000. * NEWS: Mention this bugfix.
-rw-r--r--ChangeLog8
-rw-r--r--NEWS2
-rw-r--r--lib/listfile.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c6db5c1..b08a0987 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-05-15 James Youngman <jay@gnu.org>
+ Fix Savannah bug #18227 (-ls doesn't print device major/minor).
+ * lib/listfile.c (list_file): check HAVE_STRUCT_STAT_ST_RDEV
+ instead of HAVE_ST_RDEV, fixing this bug. HAVE_ST_RDEV was
+ defined by the obsolete Autoconf macro AC_STRUCT_ST_RDEV, but
+ findutils hasn't actually called AC_STRUCT_ST_RDEV since Apr 5
+ 2000.
+ * NEWS: Mention this bugfix.
+
#29698: Correct and clarify documentation of xargs -d option
* xargs/xargs.1: Update documentation for -d option to more
clearly distinguish the treatment of backslashes in the input and
diff --git a/NEWS b/NEWS
index d91dd260..82c8fbf3 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
** Bug Fixes
+#18227: find -ls does not display device major/minor numbers.
+
#29698: Correct and clarify documentation of xargs -d option
#32887: Present xargs options alphabetically like in GNU cp(1) etc
diff --git a/lib/listfile.c b/lib/listfile.c
index 2e18aae3..21b0cd65 100644
--- a/lib/listfile.c
+++ b/lib/listfile.c
@@ -196,7 +196,7 @@ list_file (const char *name,
fprintf (stream, "%-8lu ", (unsigned long) statp->st_gid);
if (S_ISCHR (statp->st_mode) || S_ISBLK (statp->st_mode))
-#ifdef HAVE_ST_RDEV
+#ifdef HAVE_STRUCT_STAT_ST_RDEV
fprintf (stream, "%3lu, %3lu ",
(unsigned long) major (statp->st_rdev),
(unsigned long) minor (statp->st_rdev));