summaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-05-12 20:31:43 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-05-12 20:31:43 +0000
commit1bda73a7b0f45a2502ae93e33e30b98152d893f3 (patch)
tree7bdf8f59ec2c6443a071a0217f78f8a999596030 /socket.c
parent9ca8f3cf77b7d5ec5956777c2f2e8807bdbcca24 (diff)
downloadopenvpn-1bda73a7b0f45a2502ae93e33e30b98152d893f3.tar.gz
openvpn-1bda73a7b0f45a2502ae93e33e30b98152d893f3.tar.xz
openvpn-1bda73a7b0f45a2502ae93e33e30b98152d893f3.zip
Moved branch into official BETA21 position.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2959 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/socket.c b/socket.c
index e9cc1ae..78686ef 100644
--- a/socket.c
+++ b/socket.c
@@ -22,12 +22,6 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef WIN32
-#include "config-win32.h"
-#else
-#include "config.h"
-#endif
-
#include "syshead.h"
#include "socket.h"
@@ -138,6 +132,9 @@ getaddr (unsigned int flags,
while (true)
{
/* try hostname lookup */
+#if defined(HAVE_RES_INIT)
+ res_init ();
+#endif
h = gethostbyname (hostname);
if (signal_received)
@@ -2121,11 +2118,13 @@ link_socket_read_tcp (struct link_socket *sock,
#if ENABLE_IP_PKTINFO
+#pragma pack(1) /* needed to keep structure size consistent for 32 vs. 64-bit architectures */
struct openvpn_pktinfo
{
struct cmsghdr cmsghdr;
struct in_pktinfo in_pktinfo;
};
+#pragma pack()
static socklen_t
link_socket_read_udp_posix_recvmsg (struct link_socket *sock,