bug-cpio
[Top][All Lists]
Advanced

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

[Bug-cpio] 2.9: fixes for gcc2.95


From: Christian Weisgerber
Subject: [Bug-cpio] 2.9: fixes for gcc2.95
Date: Mon, 9 Jul 2007 19:21:35 +0200
User-agent: Mutt/1.4.2.3i

Two small fixes to make cpio 2.9 build on gcc2.95 platforms:

* You can't intermix variable definitions and statements.
* config.h needs to be pulled in before lib/string.h, otherwise gcc will
  choke on "restrict" qualifiers.

--- src/makepath.c.orig Wed May  9 14:06:23 2007
+++ src/makepath.c      Wed May  9 14:06:46 2007
@@ -65,10 +65,10 @@ make_path (char *argpath,
 
   if (stat (dirpath, &stats))
     {
+      char *slash = dirpath;
       tmpmode = MODE_RWX & ~ newdir_umask;
       invert_permissions = we_are_root ? 0 : MODE_WXUSR & ~ tmpmode;
 
-      char *slash = dirpath;
       while (*slash == '/')
        slash++;
       while ((slash = strchr (slash, '/')))
--- tests/argcv.c.orig  Sat May 12 10:01:50 2007
+++ tests/argcv.c       Sat May 12 10:02:02 2007
@@ -15,6 +15,10 @@
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  
USA  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <ctype.h>
 
 #include <argcv.h>
-- 
Christian "naddy" Weisgerber                          address@hidden




reply via email to

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