wok diff busybox/stuff/busybox-1.21-diet.u @ rev 15390

Up slitaz-boot-scripts (5.3.2)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Oct 30 18:29:11 2013 +0100 (2013-10-30)
parents
children 73d80d561b42
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/busybox/stuff/busybox-1.21-diet.u	Wed Oct 30 18:29:11 2013 +0100
     1.3 @@ -0,0 +1,110 @@
     1.4 +--- busybox-1.21.0/include/platform.h
     1.5 ++++ busybox-1.21.0/include/platform.h
     1.6 +@@ -460,6 +460,20 @@
     1.7 + # include <sys/ioctl.h>
     1.8 + #endif
     1.9 + 
    1.10 ++#if defined(__dietlibc__)
    1.11 ++# define __aligned_u64 __u64 __attribute__((aligned(8)))
    1.12 ++# define LOOP_SET_STATUS64	0x4C04
    1.13 ++# define LOOP_GET_STATUS64	0x4C05
    1.14 ++# define MAXSYMLINKS	20
    1.15 ++# define S_TYPEISMQ(x)	0
    1.16 ++# define S_TYPEISSEM(x)	0
    1.17 ++# define S_TYPEISSHM(x)	0
    1.18 ++# undef HAVE_STRVERSCMP
    1.19 ++# undef HAVE_DPRINTF
    1.20 ++# undef HAVE_STRCASESTR
    1.21 ++# define ttyname_r(a,b,c)	(strlcpy(b, ttyname(a), c) == 0)
    1.22 ++#endif
    1.23 ++ 
    1.24 + /*
    1.25 +  * Now, define prototypes for all the functions defined in platform.c
    1.26 +  * These must come after all the HAVE_* macros are defined (or not)
    1.27 +--- busybox-1.21.0/networking/ping.c
    1.28 ++++ busybox-1.21.0/networking/ping.c
    1.29 +@@ -29,6 +29,84 @@
    1.30 + #include <netinet/ip_icmp.h>
    1.31 + #include "libbb.h"
    1.32 + 
    1.33 ++#ifdef __dietlibc__
    1.34 ++/* Dietlibc is missing the BSD definition 'struct icmp' */
    1.35 ++/*
    1.36 ++ * Internal of an ICMP Router Advertisement
    1.37 ++ */
    1.38 ++struct icmp_ra_addr
    1.39 ++{
    1.40 ++    uint32_t ira_addr;
    1.41 ++    uint32_t ira_preference;
    1.42 ++};
    1.43 ++
    1.44 ++struct icmp
    1.45 ++{
    1.46 ++    uint8_t  icmp_type;  /* type of message, see below */
    1.47 ++    uint8_t  icmp_code;  /* type sub code */
    1.48 ++    uint16_t icmp_cksum; /* ones complement checksum of struct */
    1.49 ++    union
    1.50 ++    {
    1.51 ++	uint8_t ih_pptr;             /* ICMP_PARAMPROB */
    1.52 ++	struct in_addr ih_gwaddr;   /* gateway address */
    1.53 ++	struct ih_idseq             /* echo datagram */
    1.54 ++	{
    1.55 ++	    uint16_t icd_id;
    1.56 ++	    uint16_t icd_seq;
    1.57 ++	} ih_idseq;
    1.58 ++	uint32_t ih_void;
    1.59 ++
    1.60 ++	/* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
    1.61 ++	struct ih_pmtu
    1.62 ++	{
    1.63 ++	    uint16_t ipm_void;
    1.64 ++	    uint16_t ipm_nextmtu;
    1.65 ++	} ih_pmtu;
    1.66 ++
    1.67 ++	struct ih_rtradv
    1.68 ++	{
    1.69 ++	    uint8_t irt_num_addrs;
    1.70 ++	    uint8_t irt_wpa;
    1.71 ++	    uint16_t irt_lifetime;
    1.72 ++	} ih_rtradv;
    1.73 ++    } icmp_hun;
    1.74 ++#define icmp_pptr       icmp_hun.ih_pptr
    1.75 ++#define icmp_gwaddr     icmp_hun.ih_gwaddr
    1.76 ++#define icmp_id         icmp_hun.ih_idseq.icd_id
    1.77 ++#define icmp_seq        icmp_hun.ih_idseq.icd_seq
    1.78 ++#define icmp_void       icmp_hun.ih_void
    1.79 ++#define icmp_pmvoid     icmp_hun.ih_pmtu.ipm_void
    1.80 ++#define icmp_nextmtu    icmp_hun.ih_pmtu.ipm_nextmtu
    1.81 ++#define icmp_num_addrs  icmp_hun.ih_rtradv.irt_num_addrs
    1.82 ++#define icmp_wpa        icmp_hun.ih_rtradv.irt_wpa
    1.83 ++#define icmp_lifetime   icmp_hun.ih_rtradv.irt_lifetime
    1.84 ++    union
    1.85 ++    {
    1.86 ++	struct
    1.87 ++	{
    1.88 ++	    uint32_t its_otime;
    1.89 ++	    uint32_t its_rtime;
    1.90 ++	    uint32_t its_ttime;
    1.91 ++	} id_ts;
    1.92 ++	struct
    1.93 ++	{
    1.94 ++	    struct ip idi_ip;
    1.95 ++	    /* options and then 64 bits of data */
    1.96 ++	} id_ip;
    1.97 ++	struct icmp_ra_addr id_radv;
    1.98 ++	uint32_t   id_mask;
    1.99 ++	uint8_t    id_data[1];
   1.100 ++    } icmp_dun;
   1.101 ++#define icmp_otime      icmp_dun.id_ts.its_otime
   1.102 ++#define icmp_rtime      icmp_dun.id_ts.its_rtime
   1.103 ++#define icmp_ttime      icmp_dun.id_ts.its_ttime
   1.104 ++#define icmp_ip         icmp_dun.id_ip.idi_ip
   1.105 ++#define icmp_radv       icmp_dun.id_radv
   1.106 ++#define icmp_mask       icmp_dun.id_mask
   1.107 ++#define icmp_data       icmp_dun.id_data
   1.108 ++};
   1.109 ++#endif /* __dietlibc__ */
   1.110 ++ 
   1.111 + #ifdef __BIONIC__
   1.112 + /* should be in netinet/ip_icmp.h */
   1.113 + # define ICMP_DEST_UNREACH    3  /* Destination Unreachable  */