Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Cannot compile revision 2791

Started by sanna, October 18, 2009, 05:23:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


When trying to compile rev 2791 I get the following error
===> CXX dataobj/
dataobj/ In function 'SOCKET network_check_activity(int, char*, int&)':
dataobj/ error: invalid conversion from 'int*' to 'socklen_t*'
dataobj/ 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 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.


This results in cannot compile on windows. I added a define for this.