GSocketError _GAddress_Init_INET(GAddress *address)
{
+ address->m_len = sizeof(struct sockaddr_in);
address->m_addr = (struct sockaddr *) malloc(address->m_len);
if (address->m_addr == NULL)
{
return GSOCK_MEMERR;
}
- address->m_len = sizeof(struct sockaddr_in);
address->m_family = GSOCK_INET;
address->m_realfamily = PF_INET;
((struct sockaddr_in *)address->m_addr)->sin_family = AF_INET;
- ((struct sockaddr_in *)address->m_addr)->sin_addr.s_addr = INADDR_ANY;
+ ((struct sockaddr_in *)address->m_addr)->sin_addr.s_addr = INADDR_NONE;
return GSOCK_NOERROR;
}
return GSOCK_INVADDR;
}
+#else /* !wxUSE_SOCKETS */
-#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
-
-
+/*
+ * translation unit shouldn't be empty, so include this typedef to make the
+ * compiler (VC++ 6.0, for example) happy
+ */
+typedef (*wxDummy)();
+#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
/* Diferencias con la version Unix:
* - El descriptor es SOCKET y no int