findutils-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Findutils-patches] [PATCH] Fix Savannah bug #25154: Failure to compile


From: jay
Subject: [Findutils-patches] [PATCH] Fix Savannah bug #25154: Failure to compile with GCC-2.95.4
Date: Tue, 23 Dec 2008 11:33:35 +0000

From: James Youngman <address@hidden>

* find/parser.c (do_parse_xmin): Move declaration of struct
timespec origin before the statements; declarations afetr
statements are a GCC extension we were accidentally relying on.

Signed-off-by: James Youngman <address@hidden>
---
 ChangeLog     |    7 +++++++
 NEWS          |    2 ++
 find/parser.c |    2 +-
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b354bb5..426d40b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-12-23  James Youngman  <address@hidden>
+
+       Fix Savannah bug #25154: Failure to compile with GCC-2.95.4
+       * find/parser.c (do_parse_xmin): Move declaration of struct
+       timespec origin before the statements; declarations afetr
+       statements are a GCC extension we were accidentally relying on.
+
 2008-12-21  James Youngman  <address@hidden>
 
        Fix Savannah bug #25144: Misleading message for find -user unknown.
diff --git a/NEWS b/NEWS
index e5cb010..cf0a523 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ GNU findutils NEWS - User visible changes.      -*- outline -*- 
(allout)
 #25144: Misleading error message when argument to find -user is an
 unknown user or is missing.
 
+#25154: Allow compilation with C compilers that don't allow
+declarations to follow statements.
 
 * Major changes in release 4.5.3, 2008-12-07
 
diff --git a/find/parser.c b/find/parser.c
index 4919dfe..294672f 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -1384,8 +1384,8 @@ do_parse_xmin (const struct parser_table* entry,
   if (collect_arg(argv, arg_ptr, &minutes))
     {
       struct time_val tval;
-      tval.xval = xv;
       struct timespec origin = options.cur_day_start;
+      tval.xval = xv;
       origin.tv_sec += DAYSECS;
       if (get_relative_timestamp(minutes, &tval, origin, 60,
                                 "arithmetic overflow while converting %s "
-- 
1.5.6.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]