source: freewrt/tools/jffs2/patches/010-portability.patch@ a09b227

freewrt_1_0 freewrt_2_0
Last change on this file since a09b227 was a09b227, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

mv mkfs.jffs2 to tools, broken commit, tg will fix it soon

git-svn-id: svn://www.freewrt.org/trunk/freewrt@248 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 3.0 KB
  • mtd-20050122.orig/util/Makefile

    $FreeWRT$
    
    	portability fixes
    
    old new SYMLINKS = compr_lzari.c compr_lzo.c  
    2319        $(CC) $(LDFLAGS) -g -o $@ $^
    2420
    2521%.o: %.c
    26         $(CC) $(CFLAGS) -g -c -o $@ $< -g -Wp,-MD,.$<.dep
     22        $(CC) -include $(TOPDIR)/scripts/param.h $(CFLAGS) -g -c -o $@ $< -g -Wp,-MD,.$<.dep
    2723
    2824.SUFFIXES:
    2925
    clean:  
    3834$(SYMLINKS):
    3935        ln -sf ../fs/jffs2/$@ $@
    4036
    41 mkfs.jffs2: crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o compr.o compr_lzari.o compr_lzo.o
     37mkfs.jffs2: crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o compr.o compr_lzari.o compr_lzo.o getline.o
    4238        $(CC) $(LDFLAGS) -o $@ $^ -lz
    4339
    4440flash_eraseall: crc32.o flash_eraseall.o
  • mtd-20050122.orig/util/compr_zlib.c

    old new  
    3838#include <stdint.h>
    3939#include <zlib.h>
    4040#include <stdio.h>
     41#ifdef __linux__
    4142#include <asm/types.h>
     43#endif
    4244#include <linux/jffs2.h>
    4345#include "compr.h"
    4446
  • mtd-20050122.orig/util/mkfs.jffs2.c

    old new  
    6868#include <zlib.h>
    6969#undef crc32
    7070#include "crc32.h"
     71#include <endian.h>
    7172
    7273/* Do not use the wierd XPG version of basename */
    7374#undef basename
    static void recursive_populate_directory  
    10321033                        case S_IFDIR:
    10331034                                if (verbose) {
    10341035                                        printf("\td %04o %9lu %5d:%-3d %s\n",
    1035                                                         e->sb.st_mode & ~S_IFMT, e->sb.st_size,
     1036                                                        e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
    10361037                                                        (int) (e->sb.st_uid), (int) (e->sb.st_gid),
    10371038                                                        e->name);
    10381039                                }
    static void recursive_populate_directory  
    10411042                        case S_IFSOCK:
    10421043                                if (verbose) {
    10431044                                        printf("\ts %04o %9lu %5d:%-3d %s\n",
    1044                                                         e->sb.st_mode & ~S_IFMT, e->sb.st_size,
     1045                                                        e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
    10451046                                                        (int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
    10461047                                }
    10471048                                write_pipe(e);
    static void recursive_populate_directory  
    10491050                        case S_IFIFO:
    10501051                                if (verbose) {
    10511052                                        printf("\tp %04o %9lu %5d:%-3d %s\n",
    1052                                                         e->sb.st_mode & ~S_IFMT, e->sb.st_size,
     1053                                                        e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
    10531054                                                        (int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
    10541055                                }
    10551056                                write_pipe(e);
    static void recursive_populate_directory  
    10751076                        case S_IFLNK:
    10761077                                if (verbose) {
    10771078                                        printf("\tl %04o %9lu %5d:%-3d %s -> %s\n",
    1078                                                         e->sb.st_mode & ~S_IFMT, e->sb.st_size,
     1079                                                        e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
    10791080                                                        (int) e->sb.st_uid, (int) e->sb.st_gid, e->name,
    10801081                                                        e->link);
    10811082                                }
    static void recursive_populate_directory  
    10841085                        case S_IFREG:
    10851086                                if (verbose) {
    10861087                                        printf("\tf %04o %9lu %5d:%-3d %s\n",
    1087                                                         e->sb.st_mode & ~S_IFMT, e->sb.st_size,
     1088                                                        e->sb.st_mode & ~S_IFMT, (unsigned long)e->sb.st_size,
    10881089                                                        (int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
    10891090                                }
    10901091                                write_regular_file(e);
Note: See TracBrowser for help on using the repository browser.