diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2015-05-26 09:25:30 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2015-05-26 09:25:30 +0000 |
commit | 94a2f9fedebfd48166970d9cd03430129974b949 (patch) | |
tree | b5defc210aa1e3953205e6ae177a8355e56b42f2 /tools/mtd-utils/patches/300-libfec_use_standard_unsigned_long.patch | |
parent | 3fe418e4e0bad06e4b33aa475261a6c0b4863600 (diff) | |
download | upstream-94a2f9fedebfd48166970d9cd03430129974b949.tar.gz upstream-94a2f9fedebfd48166970d9cd03430129974b949.tar.bz2 upstream-94a2f9fedebfd48166970d9cd03430129974b949.zip |
tools/mtd-utils: upgrade to latest git
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45760 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/mtd-utils/patches/300-libfec_use_standard_unsigned_long.patch')
-rw-r--r-- | tools/mtd-utils/patches/300-libfec_use_standard_unsigned_long.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/mtd-utils/patches/300-libfec_use_standard_unsigned_long.patch b/tools/mtd-utils/patches/300-libfec_use_standard_unsigned_long.patch new file mode 100644 index 0000000000..73a68b5860 --- /dev/null +++ b/tools/mtd-utils/patches/300-libfec_use_standard_unsigned_long.patch @@ -0,0 +1,35 @@ +--- a/lib/libfec.c ++++ b/lib/libfec.c +@@ -61,8 +61,6 @@ struct timeval { + }; + #define gettimeofday(x, dummy) { (x)->ticks = clock() ; } + #define DIFF_T(a,b) (1+ 1000000*(a.ticks - b.ticks) / CLOCKS_PER_SEC ) +-typedef unsigned long u_long ; +-typedef unsigned short u_short ; + #else /* typically, unix systems */ + #include <sys/time.h> + #define DIFF_T(a,b) \ +@@ -75,12 +73,12 @@ typedef unsigned short u_short ; + t = x.tv_usec + 1000000* (x.tv_sec & 0xff ) ; \ + } + #define TOCK(t) \ +- { u_long t1 ; TICK(t1) ; \ ++ { unsigned long t1 ; TICK(t1) ; \ + if (t1 < t) t = 256000000 + t1 - t ; \ + else t = t1 - t ; \ + if (t == 0) t = 1 ;} + +-u_long ticks[10]; /* vars for timekeeping */ ++unsigned long ticks[10]; /* vars for timekeeping */ + #else + #define DEB(x) + #define DDB(x) +@@ -625,7 +623,7 @@ init_fec(void) + #define FEC_MAGIC 0xFECC0DEC + + struct fec_parms { +- u_long magic ; ++ unsigned long magic ; + int k, n ; /* parameters of the code */ + gf *enc_matrix ; + } ; |