mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
3ea5acac29
PR: 144575 ([1]), 138786 ([2]) Submitted by: Ganael Laplanche <ganael.laplanche@martymac.com> [1], Martin Laabs <spamtrap@martinlaabs.de> [2] Patch by: Ganael Laplanche <ganael.laplanche@martymac.com>
22 lines
534 B
C++
22 lines
534 B
C++
--- src/net/netSocket.cxx.orig 2008-03-11 05:06:20.000000000 +0300
|
|
+++ src/net/netSocket.cxx 2010-03-09 18:53:58.000000000 +0300
|
|
@@ -38,6 +38,7 @@
|
|
#include <unistd.h>
|
|
#include <netdb.h>
|
|
#include <fcntl.h>
|
|
+#include <stddef.h>
|
|
|
|
#else
|
|
|
|
@@ -64,8 +65,10 @@
|
|
|
|
void netAddress::set ( const char* host, int port )
|
|
{
|
|
+ int dummy[(sizeof(netAddress) == sizeof(sockaddr_in))*2-1]; // Compile time assert
|
|
memset(this, 0, sizeof(netAddress));
|
|
|
|
+ sin_len = sizeof(netAddress);
|
|
sin_family = AF_INET ;
|
|
sin_port = htons (port);
|
|
|