1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00
freebsd-ports/x11-toolkits/plib/files/patch-src-net-netSocket.cxx
Dmitry Marakasov 3ea5acac29 - Add a patch to fix network-related functionality
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>
2010-03-15 14:35:32 +00:00

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);