mirror of https://github.com/aria2/aria2
2010-02-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error with mingw32 cross compiler. Defined a2_sockopt_t as void* for the target systems other than mingw32. * src/SocketCore.cc * src/a2netcompat.hpull/1/head
parent
ab0662e580
commit
aa2036a70d
|
@ -1,3 +1,10 @@
|
|||
2010-02-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed compile error with mingw32 cross compiler. Defined
|
||||
a2_sockopt_t as void* for the target systems other than mingw32.
|
||||
* src/SocketCore.cc
|
||||
* src/a2netcompat.h
|
||||
|
||||
2010-02-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Removed 'always true' condition
|
||||
|
|
|
@ -418,14 +418,14 @@ void SocketCore::establishConnection(const std::string& host, uint16_t port)
|
|||
void SocketCore::setSockOpt
|
||||
(int level, int optname, void* optval, socklen_t optlen)
|
||||
{
|
||||
if(setsockopt(sockfd, level, optname, optval, optlen) < 0) {
|
||||
if(setsockopt(sockfd, level, optname, (a2_sockopt_t)optval, optlen) < 0) {
|
||||
throw DL_ABORT_EX(StringFormat(EX_SOCKET_SET_OPT, errorMsg()).str());
|
||||
}
|
||||
}
|
||||
|
||||
void SocketCore::setMulticastTtl(unsigned char ttl)
|
||||
{
|
||||
setSockOpt(IPPROTO_IP, IP_MULTICAST_TTL, (a2_sockopt_t)&ttl, sizeof(ttl));
|
||||
setSockOpt(IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));
|
||||
}
|
||||
|
||||
void SocketCore::joinMulticastGroup(const std::string& ipaddr, uint16_t port)
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
# undef HAVE_GAI_STRERROR
|
||||
# undef gai_strerror
|
||||
#else
|
||||
# define a2_sockopt_t int *
|
||||
# define a2_sockopt_t void *
|
||||
#endif // __MINGW32__
|
||||
|
||||
#ifdef HAVE_NETDB_H
|
||||
|
|
Loading…
Reference in New Issue