Группа :: Система/Серверы
Пакет: miredo
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: miredo-1.2.6-alt-armh.patch
Скачать
Скачать
Fix data align problem while build on ARMv7
--- libteredo/md5.c
+++ libteredo/md5.c
@@ -176,14 +176,9 @@ md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
* On little-endian machines, we can process properly aligned
* data without copying it.
*/
- if (!((data - (const md5_byte_t *)0) & 3)) {
- /* data are properly aligned */
- X = (const md5_word_t *)data;
- } else {
/* not aligned */
memcpy(xbuf, data, 64);
X = xbuf;
- }
}
#endif
#if BYTE_ORDER == 0
--- libteredo/packets.c
+++ libteredo/packets.c
@@ -204,7 +204,7 @@ teredo_parse_ra (const teredo_packet *restrict packet,
case ND_OPT_PREFIX_INFORMATION:
{
const struct nd_opt_prefix_info *pi =
- (const struct nd_opt_prefix_info *)hdr;
+ (const struct nd_opt_prefix_info *)(void const *)hdr;
if ((optlen < sizeof (*pi)) /* option too short */
|| (pi->nd_opt_pi_prefix_len != 64) /* unsupp. prefix size */)
@@ -224,7 +224,7 @@ teredo_parse_ra (const teredo_packet *restrict packet,
/* MTU option */
case ND_OPT_MTU:
{
- const struct nd_opt_mtu *mo = (const struct nd_opt_mtu *)hdr;
+ const struct nd_opt_mtu *mo = (const struct nd_opt_mtu *)(void const *)hdr;
/*if (optlen < sizeof (*mo)) -- not possible (optlen >= 8)
return -1;*/
--- libteredo/maintain.c
+++ libteredo/maintain.c
@@ -97,13 +97,12 @@ static int getipv4byname (const char *restrict name, uint32_t *restrict ipv4)
if (val)
return val;
- *ipv4 = ((const struct sockaddr_in *)(res->ai_addr))->sin_addr.s_addr;
+ *ipv4 = ((const struct sockaddr_in *)(void const *)(res->ai_addr))->sin_addr.s_addr;
freeaddrinfo (res);
return 0;
}
-
/**
* Checks and parses a received Router Advertisement.
*
--- libteredo/teredo.c
+++ libteredo/teredo.c
@@ -226,7 +226,7 @@ static int teredo_recv_inner (int fd, struct teredo_packet *p, int flags)
&& (cmsg->cmsg_type == IP_PKTINFO))
{
const struct in_pktinfo *nfo =
- (struct in_pktinfo *)CMSG_DATA (cmsg);
+ (struct in_pktinfo *)(void *)CMSG_DATA (cmsg);
p->dest_ipv4 = nfo->ipi_addr.s_addr;
}
# elif defined(IP_RECVDSTADDR)
@@ -305,7 +305,7 @@ static int teredo_recv_inner (int fd, struct teredo_packet *p, int flags)
}
p->ip6_len = length;
- p->ip6 = (struct ip6_hdr *)ptr;
+ p->ip6 = (struct ip6_hdr *)(void *)ptr;
return 0;
}
--- src/conf.c
+++ src/conf.c
@@ -402,7 +402,7 @@ int GetIPv4ByName (const char *hostname, uint32_t *ipv4)
if (check)
return check;
- *ipv4 = ((const struct sockaddr_in *)res->ai_addr)->sin_addr.s_addr;
+ *ipv4 = ((const struct sockaddr_in *)(const void *)res->ai_addr)->sin_addr.s_addr;
freeaddrinfo (res);
return 0;
}