mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-01 22:05:08 +00:00
875e2aad35
build for -current.
31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
--- sockobj.cc.orig Sat May 15 06:13:54 1999
|
|
+++ sockobj.cc Sat May 27 14:57:47 2000
|
|
@@ -53,6 +53,9 @@
|
|
#include <stdarg.h>
|
|
#include <errno.h>
|
|
#include <time.h>
|
|
+#if defined(__FreeBSD__) && __FreeBSD__ >= 5
|
|
+#include <machine/param.h> /* for ALIGN macro needed by CMSG_DATA */
|
|
+#endif
|
|
#include <sys/socket.h>
|
|
#include <sys/un.h>
|
|
#include <netinet/in.h>
|
|
@@ -645,7 +648,7 @@
|
|
global_nconnections++;
|
|
if(xsocket->status==0){
|
|
hisaddresslength=128;
|
|
- h=accept(xsocket->gethandle(),(struct sockaddr*)s,&hisaddresslength);
|
|
+ h=accept(xsocket->gethandle(),(struct sockaddr*)s,(socklen_t*)&hisaddresslength);
|
|
if(h<0) return;
|
|
hisaddress=(struct sockaddr*)malloc(hisaddresslength);
|
|
if(hisaddress) memcpy(hisaddress,s,hisaddresslength); else{
|
|
@@ -1861,7 +1864,7 @@
|
|
if(fdarray[sockets[i]->handleindexforwheel].revents&POLLIN){
|
|
fdarray[sockets[i]->handleindexforwheel].revents&=~POLLIN;
|
|
hisaddresslength=128;
|
|
- h=accept(sockets[i]->gethandle(),(struct sockaddr*)s,&hisaddresslength);
|
|
+ h=accept(sockets[i]->gethandle(),(struct sockaddr*)s,(socklen_t*)&hisaddresslength);
|
|
if(h>=0){
|
|
#ifdef DEBUG
|
|
log("Wheel::onepass: accepting connection");
|