change weil profile (less packages, wifi ch 10)
[project/luci.git] / contrib / lar / openwrt / 050-lar-source-loader.patch
index ac282dc..c2e1c59 100644 (file)
@@ -344,8 +344,8 @@ diff -Nbur lua-5.1.4.orig/src/lar.c lua-5.1.4/src/lar.c
 +}
 diff -Nbur lua-5.1.4.orig/src/lar.h lua-5.1.4/src/lar.h
 --- lua-5.1.4.orig/src/lar.h   1970-01-01 01:00:00.000000000 +0100
-+++ lua-5.1.4/src/lar.h        2009-04-13 16:51:32.000000000 +0200
-@@ -0,0 +1,114 @@
++++ lua-5.1.4/src/lar.h        2009-04-13 17:13:47.000000000 +0200
+@@ -0,0 +1,108 @@
 +/*
 + * lar - Lua Archive Library
 + *
@@ -436,12 +436,6 @@ diff -Nbur lua-5.1.4.orig/src/lar.h lua-5.1.4/src/lar.h
 +typedef struct lar_member_item lar_member;
 +typedef struct lar_archive_handle lar_archive;
 +
-+/*
-+static int lar_read_filenames( lar_archive *ar );
-+static int lar_read32( int fd, uint32_t *val );
-+static int lar_read16( int fd, uint16_t *val );
-+static void lar_md5( char *md5, const char *data, int len );
-+*/
 +
 +lar_index * lar_get_index( lar_archive *ar );
 +
@@ -462,7 +456,7 @@ diff -Nbur lua-5.1.4.orig/src/lar.h lua-5.1.4/src/lar.h
 +#endif
 diff -Nbur lua-5.1.4.orig/src/larlib.c lua-5.1.4/src/larlib.c
 --- lua-5.1.4.orig/src/larlib.c        1970-01-01 01:00:00.000000000 +0100
-+++ lua-5.1.4/src/larlib.c     2009-04-13 16:51:15.000000000 +0200
++++ lua-5.1.4/src/larlib.c     2009-04-13 17:24:57.000000000 +0200
 @@ -0,0 +1,540 @@
 +/*
 + * lar - Lua Archive Library
@@ -611,7 +605,7 @@ diff -Nbur lua-5.1.4.orig/src/larlib.c lua-5.1.4/src/larlib.c
 +      int nlen = strlen(name);
 +      int plen = strlen(path);
 +
-+      if( (nlen + plen + 1) <= 1024 )
++      if( (nlen + plen + 1) <= LAR_FNAME_BUFFER )
 +      {
 +              strcpy(buffer, path);
 +
@@ -917,10 +911,10 @@ diff -Nbur lua-5.1.4.orig/src/larlib.c lua-5.1.4/src/larlib.c
 +      int i;
 +      const char *filename = luaL_checkstring( L, 1 );
 +      const char *basepath = luaL_optstring( L, 2, "./" );
-+      char filepath[1024];
 +      struct stat s;
 +      lar_archive *ar;
 +      lar_member  *mb;
++      LAR_FNAME(filepath);
 +
 +      const char *searchpath[3] = { basepath, LUA_LDIR, LUA_CDIR };
 +