The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: sanna on October 18, 2009, 05:23:06 PM

Title: Cannot compile revision 2791
Post by: sanna on October 18, 2009, 05:23:06 PM
When trying to compile rev 2791 I get the following error
===> CXX dataobj/network.cc
dataobj/network.cc: In function 'SOCKET network_check_activity(int, char*, int&)':
dataobj/network.cc:207: error: invalid conversion from 'int*' to 'socklen_t*'
dataobj/network.cc:207: error:   initializing argument 3 of 'int accept(int, sockaddr*, socklen_t*)'


--
debian/squeeze - gcc (Debian 4.3.4-2) 4.3.4

EDIT: Simply replacing the offending int in network.cc:207:SOCKET s = accept(my_socket, (struct sockaddr *)&client_name, (int *)&size);
with the requested socklen_t SOCKET s = accept(my_socket, (struct sockaddr *)&client_name, (socklen_t *)&size); allows me to compile - but I have no idea of the implications.
Title: Re: Cannot compile revision 2791
Post by: prissi on October 18, 2009, 08:51:23 PM
This results in cannot compile on windows. I added a define for this.