projects
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8006e34
)
non-IPv6 compilation error fixes.
author
Pekka Riikonen
<priikone@silcnet.org>
Sun, 4 Nov 2007 14:18:04 +0000
(14:18 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Sun, 4 Nov 2007 14:18:04 +0000
(14:18 +0000)
lib/silcutil/unix/silcunixnet.c
patch
|
blob
|
history
diff --git
a/lib/silcutil/unix/silcunixnet.c
b/lib/silcutil/unix/silcunixnet.c
index e0befdc19979ca325a83cd39b6da9015e34a28f8..daf9e1837a70dcf231e24002da1794df70452b20 100644
(file)
--- a/
lib/silcutil/unix/silcunixnet.c
+++ b/
lib/silcutil/unix/silcunixnet.c
@@
-363,8
+363,10
@@
int silc_net_udp_receive(SilcStream stream, char *remote_ip_addr,
if (remote_ip_addr && remote_port) {
if (sock->ipv6) {
if (remote_ip_addr && remote_port) {
if (sock->ipv6) {
+#ifdef HAVE_IPV6
from = (struct sockaddr *)&s.sin6;
flen = sizeof(s.sin6);
from = (struct sockaddr *)&s.sin6;
flen = sizeof(s.sin6);
+#endif /* HAVE_IPV6 */
} else {
from = (struct sockaddr *)&s.sin;
flen = sizeof(s.sin);
} else {
from = (struct sockaddr *)&s.sin;
flen = sizeof(s.sin);
@@
-395,9
+397,13
@@
int silc_net_udp_receive(SilcStream stream, char *remote_ip_addr,
/* Return remote address */
if (remote_ip_addr && remote_port) {
if (sock->ipv6) {
/* Return remote address */
if (remote_ip_addr && remote_port) {
if (sock->ipv6) {
+#ifdef HAVE_IPV6
*remote_port = ntohs(s.sin6.sin6_port);
inet_ntop(AF_INET6, &s.sin6.sin6_addr, remote_ip_addr,
remote_ip_addr_size);
*remote_port = ntohs(s.sin6.sin6_port);
inet_ntop(AF_INET6, &s.sin6.sin6_addr, remote_ip_addr,
remote_ip_addr_size);
+#else
+ *remote_port = 0;
+#endif /* HAVE_IPV6 */
} else {
*remote_port = ntohs(s.sin.sin_port);
inet_ntop(AF_INET, &s.sin.sin_addr, remote_ip_addr,
} else {
*remote_port = ntohs(s.sin.sin_port);
inet_ntop(AF_INET, &s.sin.sin_addr, remote_ip_addr,