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                          [EMAIL PROTECTED]


_______________________________________________
Bug-cpio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-cpio

Reply via email to