- fix build for gcc42
Submitted by: rdivacky (Roman Divacky)
This commit is contained in:
parent
ffb6ff4a93
commit
70b6e76214
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=197863
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
PORTNAME= xanim
|
PORTNAME= xanim
|
||||||
PORTVERSION= 2.92.0
|
PORTVERSION= 2.92.0
|
||||||
PORTREVISION= 1
|
PORTREVISION= 2
|
||||||
CATEGORIES= multimedia graphics
|
CATEGORIES= multimedia graphics
|
||||||
MASTER_SITES= ftp://ftp.informatik.uni-hamburg.de/pub/soft/graphics/xanim/:main \
|
MASTER_SITES= ftp://ftp.informatik.uni-hamburg.de/pub/soft/graphics/xanim/:main \
|
||||||
${MASTER_SITE_LOCAL} \
|
${MASTER_SITE_LOCAL} \
|
||||||
|
57
multimedia/xanim/files/patch-xa_input.c
Normal file
57
multimedia/xanim/files/patch-xa_input.c
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
--- xa_input.c.orig Sun Mar 21 23:36:25 1999
|
||||||
|
+++ xa_input.c Thu Jun 7 15:02:43 2007
|
||||||
|
@@ -1025,28 +1025,28 @@
|
||||||
|
memset(&data,0,sizeof(data));
|
||||||
|
memset(&from,0,sizeof(from));
|
||||||
|
if (gethostname(hostname, sizeof(hostname)) < 0)
|
||||||
|
- return(xa_ftp_abort(xin));
|
||||||
|
+ return(xa_ftp_abort(*xin));
|
||||||
|
if ((host= (struct hostent *)gethostbyname(hostname)) == 0)
|
||||||
|
- return(xa_ftp_abort(xin));
|
||||||
|
+ return(xa_ftp_abort(*xin));
|
||||||
|
data.sin_family = host->h_addrtype;
|
||||||
|
memcpy( (char *)&data.sin_addr, (char *)host->h_addr_list[0], host->h_length);
|
||||||
|
if ((tmp_sock = socket ( AF_INET , SOCK_STREAM , 0 )) < 0)
|
||||||
|
- return(xa_ftp_abort(xin));
|
||||||
|
+ return(xa_ftp_abort(*xin));
|
||||||
|
len = 1;
|
||||||
|
if (setsockopt(tmp_sock, SOL_SOCKET, SO_REUSEADDR,
|
||||||
|
(char *)(&len), sizeof(len)) < 0)
|
||||||
|
- { close(tmp_sock); return(xa_ftp_abort(xin)); }
|
||||||
|
+ { close(tmp_sock); return(xa_ftp_abort(*xin)); }
|
||||||
|
|
||||||
|
data.sin_port = 0;
|
||||||
|
if ( bind(tmp_sock, (struct sockaddr *)&data, sizeof(data)) < 0 )
|
||||||
|
- { close(tmp_sock); return(xa_ftp_abort(xin)); }
|
||||||
|
+ { close(tmp_sock); return(xa_ftp_abort(*xin)); }
|
||||||
|
|
||||||
|
len = sizeof(data);
|
||||||
|
if (getsockname(tmp_sock, (struct sockaddr *)&data, &len) < 0 )
|
||||||
|
- { close(tmp_sock); return(xa_ftp_abort(xin)); }
|
||||||
|
+ { close(tmp_sock); return(xa_ftp_abort(*xin)); }
|
||||||
|
|
||||||
|
if (listen(tmp_sock, 4) < 0 )
|
||||||
|
- { close(tmp_sock); return(xa_ftp_abort(xin)); }
|
||||||
|
+ { close(tmp_sock); return(xa_ftp_abort(*xin)); }
|
||||||
|
|
||||||
|
/* POD add support for PORT command? */
|
||||||
|
addr = (xaUBYTE *) (&data.sin_addr);
|
||||||
|
@@ -1059,15 +1059,15 @@
|
||||||
|
|
||||||
|
if (xa_ftp_send_cmd(xin, port_cmd, &retcode) == xaFALSE)
|
||||||
|
{ fprintf(stderr,"FTP: send cmd err\n");
|
||||||
|
- close(tmp_sock); return(xa_ftp_abort(xin)); }
|
||||||
|
+ close(tmp_sock); return(xa_ftp_abort(*xin)); }
|
||||||
|
|
||||||
|
if (xa_ftp_send_cmd(xin, file_cmd, &retcode) == xaFALSE)
|
||||||
|
{ fprintf(stderr,"FTP: send cmd err\n");
|
||||||
|
- close(tmp_sock); return(xa_ftp_abort(xin)); }
|
||||||
|
+ close(tmp_sock); return(xa_ftp_abort(*xin)); }
|
||||||
|
|
||||||
|
len = sizeof(from);
|
||||||
|
xin->dsock = accept((int)tmp_sock, (struct sockaddr *) &from, (int *)&len);
|
||||||
|
- if (xin->dsock < 0) { close(tmp_sock); return(xa_ftp_abort(xin)); }
|
||||||
|
+ if (xin->dsock < 0) { close(tmp_sock); return(xa_ftp_abort(*xin)); }
|
||||||
|
close(tmp_sock);
|
||||||
|
return(xaTRUE);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user