News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

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.

sanna

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.

prissi

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