}
} else if (!dad) {
int on = 1;
- int alen = sizeof(saddr);
+ socklen_t alen = sizeof(saddr);
saddr.sin_port = htons(1025);
saddr.sin_addr = dst;
}
{
- int alen = sizeof(me);
+ socklen_t alen = sizeof(me);
if (getsockname(s, (struct sockaddr *) &me, &alen) == -1) {
bb_error_msg("getsockname");
while (1) {
sigset_t sset, osset;
- char packet[4096];
+ unsigned char packet[4096];
struct sockaddr_ll from;
- int alen = sizeof(from);
+ socklen_t alen = sizeof(from);
int cc;
if ((cc = recvfrom(s, packet, sizeof(packet), 0,
#ifdef CONFIG_LFS
# define cont_l_fmt "%lld"
+# define cont_l_type (long long)
#else
# define cont_l_fmt "%ld"
+# define cont_l_type (long)
#endif
#define TIMEOUT 60
if (config->ContentLength != -1) { /* file */
strftime(timeStr, sizeof(timeStr), RFC1123FMT, gmtime(&config->last_mod));
len += sprintf(buf+len, "Last-Modified: %s\r\n%s " cont_l_fmt "\r\n",
- timeStr, Content_length, config->ContentLength);
+ timeStr, Content_length, cont_l_type config->ContentLength);
}
strcat(buf, "\r\n");
len += 2;
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf));
- return (UNSPEC_print(sap->sa_data));
+ return (UNSPEC_print((unsigned char *)sap->sa_data));
}
static struct aftype unspec_aftype = {
hardware address if it's null. */
if (hw->print != NULL && (!(hw_null_address(hw, ptr->hwaddr) &&
hw->suppress_null_addr)))
- printf(_("HWaddr %s "), hw->print(ptr->hwaddr));
+ printf(_("HWaddr %s "), hw->print((unsigned char *)ptr->hwaddr));
#ifdef IFF_PORTSEL
if (ptr->flags & IFF_PORTSEL) {
printf(_("Media:%s"), if_port_text[ptr->map.port] /* [0] */);
static void INET_setroute(int action, char **args)
{
struct rtentry rt;
- const char *netmask;
+ const char *netmask = NULL;
int skfd, isnet, xflag;
assert((action == RTACTION_ADD) || (action == RTACTION_DEL));
*/
int i, j;
- byte * p = G.buf;
+ byte * p = (byte*)G.buf;
byte outbuf[4*DATABUFSIZE];
for (i = len, j = 0; i > 0; i--, p++)
*/
static char *
remove_iacs(struct tsession *ts, int *pnum_totty) {
- unsigned char *ptr0 = ts->buf1 + ts->wridx1;
+ unsigned char *ptr0 = (unsigned char *)ts->buf1 + ts->wridx1;
unsigned char *ptr = ptr0;
unsigned char *totty = ptr;
unsigned char *end = ptr + MIN(BUFSIZE - ts->wridx1, ts->size1);
static const char route[] = "/proc/net/route";
/* last inbound (icmp) packet */
-static u_char packet[512] __attribute__((align (32)));
+static u_char packet[512] __attribute__((aligned (32)));
static struct ip *outip; /* last output (udp) packet */
static struct udphdr *outudp; /* last output (udp) packet */
if (errno == EINVAL)
bb_error_msg_and_die(
"SIOCGIFCONF: ifreq struct too small (%d bytes)",
- sizeof(ibuf));
+ (int)sizeof(ibuf));
else
bb_perror_msg_and_die("SIOCGIFCONF");
}
#ifdef CONFIG_FEATURE_WGET_AUTHENTICATION
if (target.user) {
fprintf(sfp, "Authorization: Basic %s\r\n",
- base64enc(target.user, buf, sizeof(buf)));
+ base64enc((unsigned char*)target.user, buf, sizeof(buf)));
}
if (use_proxy && server.user) {
fprintf(sfp, "Proxy-Authorization: Basic %s\r\n",
- base64enc(server.user, buf, sizeof(buf)));
+ base64enc((unsigned char*)server.user, buf, sizeof(buf)));
}
#endif
goto fail;
} else {
struct ifreq ifr;
- short seed[3];
+ unsigned short seed[3];
// get the interface's ethernet address
memset(&ifr, 0, sizeof (ifr));