# HG changeset patch # User Pascal Bellard # Date 1561631525 -7200 # Node ID 0830d8859de865fce19fa0e280ceafa83ce1bdf6 # Parent 24ba9ec842e9242c48fbb3586675bd72c2ca7300 protobuf: update deps diff -r 24ba9ec842e9 -r 0830d8859de8 busybox/stuff/busybox-1.31-ash.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.31-ash.u Thu Jun 27 12:32:05 2019 +0200 @@ -0,0 +1,17 @@ +Some SliTaz scripts (cook) need that... +--- busybox-1.30/shell/ash.c ++++ busybox-1.30/shell/ash.c +@@ -13300,7 +13300,13 @@ + if (strchr(name, '/')) + return name; + ++ /* IIRC standards do not say whether . is to be searched. Bash do it. */ ++ if (ENABLE_ASH_BASH_COMPAT) { ++ fullname = name; ++ goto try_cur_dir; ++ } + while ((fullname = path_advance(&path, name)) != NULL) { ++ try_cur_dir: + if ((stat(fullname, &statb) == 0) && S_ISREG(statb.st_mode)) { + /* + * Don't bother freeing here, since it will diff -r 24ba9ec842e9 -r 0830d8859de8 busybox/stuff/busybox-1.31-cmdline.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.31-cmdline.u Thu Jun 27 12:32:05 2019 +0200 @@ -0,0 +1,36 @@ +--- busybox-1.30/libbb/appletlib.c ++++ busybox-1.30/libbb/appletlib.c +@@ -118,9 +118,16 @@ + + #endif /* FEATURE_COMPRESS_USAGE */ + +- ++static char **bb_argv; + void FAST_FUNC bb_show_usage(void) + { ++ full_write2_str("\nCommand line: "); ++ while (*bb_argv) { ++ full_write2_str(*bb_argv++); ++ full_write2_str(" "); ++ } ++ full_write2_str("\n\n"); ++ + if (ENABLE_SHOW_USAGE) { + #ifdef SINGLE_APPLET_STR + /* Imagine that this applet is "true". Dont link in printf! */ +@@ -820,6 +827,7 @@ + # endif + int busybox_main(int argc UNUSED_PARAM, char **argv) + { ++ bb_argv = argv; + if (!argv[1]) { + /* Called without arguments */ + const char *a; +@@ -1033,6 +1041,7 @@ + int main(int argc UNUSED_PARAM, char **argv) + #endif + { ++ bb_argv = argv; + #if 0 + /* TODO: find a use for a block of memory between end of .bss + * and end of page. For example, I'm getting "_end:0x812e698 2408 bytes" diff -r 24ba9ec842e9 -r 0830d8859de8 busybox/stuff/busybox-1.31-cpio.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.31-cpio.u Thu Jun 27 12:32:05 2019 +0200 @@ -0,0 +1,12 @@ +--- busybox-1.31/archival/cpio.c ++++ busybox-1.31/archival/cpio.c +@@ -247,6 +247,9 @@ + if (!(S_ISLNK(st.st_mode) || S_ISREG(st.st_mode))) + st.st_size = 0; /* paranoia */ + ++ if (S_ISLNK(st.st_mode)) ++ st.st_nlink = 1; /* like GNU cpio */ ++ + /* Store hardlinks for later processing, dont output them */ + if (!S_ISDIR(st.st_mode) && st.st_nlink > 1) { + struct name_s *n; diff -r 24ba9ec842e9 -r 0830d8859de8 busybox/stuff/busybox-1.31-diet.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.31-diet.u Thu Jun 27 12:32:05 2019 +0200 @@ -0,0 +1,115 @@ +--- busybox-1.31/include/platform.h ++++ busybox-1.31/include/platform.h +@@ -533,6 +533,25 @@ + # undef HAVE_PRINTF_PERCENTM + #endif + ++#if defined(__dietlibc__) ++# define __aligned_u64 __u64 __attribute__((aligned(8))) ++# define LOOP_SET_STATUS64 0x4C04 ++# define LOOP_GET_STATUS64 0x4C05 ++# define MAXSYMLINKS 20 ++# define S_TYPEISMQ(x) 0 ++# define S_TYPEISSEM(x) 0 ++# define S_TYPEISSHM(x) 0 ++# define O_CLOEXEC 0 ++# undef HAVE_STRVERSCMP ++# undef HAVE_DPRINTF ++# undef HAVE_STRCASESTR ++#undef ALWAYS_INLINE ++#define ALWAYS_INLINE inline ++#undef NOINLINE ++#define NOINLINE ++# define ttyname_r(a,b,c) (strlcpy(b, ttyname(a), c) == 0) ++#endif ++ + /* + * Now, define prototypes for all the functions defined in platform.c + * These must come after all the HAVE_* macros are defined (or not) +--- busybox-1.31/networking/ping.c ++++ busybox-1.31/networking/ping.c +@@ -123,6 +124,84 @@ + #include "libbb.h" + #include "common_bufsiz.h" + ++#ifdef __dietlibc__ ++/* Dietlibc is missing the BSD definition 'struct icmp' */ ++/* ++ * Internal of an ICMP Router Advertisement ++ */ ++struct icmp_ra_addr ++{ ++ uint32_t ira_addr; ++ uint32_t ira_preference; ++}; ++ ++struct icmp ++{ ++ uint8_t icmp_type; /* type of message, see below */ ++ uint8_t icmp_code; /* type sub code */ ++ uint16_t icmp_cksum; /* ones complement checksum of struct */ ++ union ++ { ++ uint8_t ih_pptr; /* ICMP_PARAMPROB */ ++ struct in_addr ih_gwaddr; /* gateway address */ ++ struct ih_idseq /* echo datagram */ ++ { ++ uint16_t icd_id; ++ uint16_t icd_seq; ++ } ih_idseq; ++ uint32_t ih_void; ++ ++ /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */ ++ struct ih_pmtu ++ { ++ uint16_t ipm_void; ++ uint16_t ipm_nextmtu; ++ } ih_pmtu; ++ ++ struct ih_rtradv ++ { ++ uint8_t irt_num_addrs; ++ uint8_t irt_wpa; ++ uint16_t irt_lifetime; ++ } ih_rtradv; ++ } icmp_hun; ++#define icmp_pptr icmp_hun.ih_pptr ++#define icmp_gwaddr icmp_hun.ih_gwaddr ++#define icmp_id icmp_hun.ih_idseq.icd_id ++#define icmp_seq icmp_hun.ih_idseq.icd_seq ++#define icmp_void icmp_hun.ih_void ++#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void ++#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu ++#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs ++#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa ++#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime ++ union ++ { ++ struct ++ { ++ uint32_t its_otime; ++ uint32_t its_rtime; ++ uint32_t its_ttime; ++ } id_ts; ++ struct ++ { ++ struct ip idi_ip; ++ /* options and then 64 bits of data */ ++ } id_ip; ++ struct icmp_ra_addr id_radv; ++ uint32_t id_mask; ++ uint8_t id_data[1]; ++ } icmp_dun; ++#define icmp_otime icmp_dun.id_ts.its_otime ++#define icmp_rtime icmp_dun.id_ts.its_rtime ++#define icmp_ttime icmp_dun.id_ts.its_ttime ++#define icmp_ip icmp_dun.id_ip.idi_ip ++#define icmp_radv icmp_dun.id_radv ++#define icmp_mask icmp_dun.id_mask ++#define icmp_data icmp_dun.id_data ++}; ++#endif /* __dietlibc__ */ ++ + #ifdef __BIONIC__ + /* should be in netinet/ip_icmp.h */ + # define ICMP_DEST_UNREACH 3 /* Destination Unreachable */ diff -r 24ba9ec842e9 -r 0830d8859de8 busybox/stuff/busybox-1.31-diff.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.31-diff.u Thu Jun 27 12:32:05 2019 +0200 @@ -0,0 +1,53 @@ +--- busybox-1.31/editors/diff.c ++++ busybox-1.31/editors/diff.c +@@ -109,6 +109,7 @@ + //usage: "\n -B Ignore changes whose lines are all blank" + //usage: "\n -d Try hard to find a smaller set of changes" + //usage: "\n -i Ignore case differences" ++//usage: "\n -l Ignore symbolic links" + //usage: "\n -L Use LABEL instead of the filename in the unified header" + //usage: "\n -N Treat absent files as empty" + //usage: "\n -q Output only whether files differ" +@@ -140,6 +141,7 @@ + FLAG_b, + FLAG_d, + FLAG_i, ++ FLAG_l, + FLAG_L, /* never used, handled by getopt32 */ + FLAG_N, + FLAG_q, +@@ -754,6 +756,14 @@ + j = fread(buf1, 1, sz, fp[1]); + if (i != j) { + differ = true; ++ /* Ensure we detect binary file even if a file is empty or very ++ short. */ ++ for (k = 0; k < i; k++) ++ if (!buf0[k]) ++ binary = true; ++ for (k = 0; k < j; k++) ++ if (!buf1[k]) ++ binary = true; + i = MIN(i, j); + } + if (i == 0) +@@ -867,7 +877,9 @@ + * Using list.len to specify its length, + * add_to_dirlist will remove it. */ + list[i].len = strlen(p[i]); +- recursive_action(p[i], ACTION_RECURSE | ACTION_FOLLOWLINKS, ++ recursive_action(p[i], ++ (option_mask32 & FLAG(l)) ? ACTION_RECURSE : ++ ACTION_RECURSE | ACTION_FOLLOWLINKS, + add_to_dirlist, skip_dir, &list[i], 0); + /* Sort dl alphabetically. + * GNU diff does this ignoring any number of trailing dots. +@@ -982,7 +994,7 @@ + INIT_G(); + + /* exactly 2 params; collect multiple -L