News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

r10463 - network.cc not compile

Started by Andarix, February 06, 2022, 03:59:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andarix

windows compile, all other not compile

Quote...
2022-02-06T15:56:45.6627232Z ===> HOSTCXX src/simutrans/network/network.cc
2022-02-06T15:56:45.9879927Z src/simutrans/network/network.cc: In function 'SOCKET network_open_address(const char*, const char*&)':
2022-02-06T15:56:45.9887854Z src/simutrans/network/network.cc:306:11: error: 'sockfd' was not declared in this scope
2022-02-06T15:56:45.9888276Z      fcntl(sockfd, F_SETFL, O_NONBLOCK);
2022-02-06T15:56:45.9888527Z            ^~~~~~
2022-02-06T15:56:45.9889264Z src/simutrans/network/network.cc:306:11: note: suggested alternative: 'lockf'
2022-02-06T15:56:45.9889844Z      fcntl(sockfd, F_SETFL, O_NONBLOCK);
2022-02-06T15:56:45.9890281Z            ^~~~~~
2022-02-06T15:56:45.9940784Z            lockf
2022-02-06T15:56:45.9941402Z src/simutrans/network/network.cc:313:7: error: 'closesocket' was not declared in this scope
2022-02-06T15:56:45.9941716Z        closesocket(my_client_socket);
2022-02-06T15:56:45.9941943Z        ^~~~~~~~~~~
2022-02-06T15:56:45.9942326Z src/simutrans/network/network.cc:313:7: note: suggested alternative: 'socket'
2022-02-06T15:56:45.9942630Z        closesocket(my_client_socket);
2022-02-06T15:56:45.9942836Z        ^~~~~~~~~~~
2022-02-06T15:56:45.9943035Z        socket
2022-02-06T15:56:45.9944092Z src/simutrans/network/network.cc:325:29: warning: missing initializer for member 'timeval::tv_usec' [-Wmissing-field-initializers]
2022-02-06T15:56:45.9944642Z       timeval time_out = { 0 };
2022-02-06T15:56:45.9944871Z                              ^
2022-02-06T15:56:45.9945421Z src/simutrans/network/network.cc:333:7: error: 'closesocket' was not declared in this scope
2022-02-06T15:56:45.9945778Z        closesocket(my_client_socket);
2022-02-06T15:56:45.9946384Z        ^~~~~~~~~~~
2022-02-06T15:56:45.9946804Z src/simutrans/network/network.cc:333:7: note: suggested alternative: 'socket'
2022-02-06T15:56:45.9947152Z        closesocket(my_client_socket);
2022-02-06T15:56:45.9947388Z        ^~~~~~~~~~~
2022-02-06T15:56:45.9947605Z        socket
2022-02-06T15:56:45.9948040Z src/simutrans/network/network.cc:340:7: error: 'closesocket' was not declared in this scope
2022-02-06T15:56:45.9948403Z        closesocket(my_client_socket);
2022-02-06T15:56:45.9948653Z        ^~~~~~~~~~~
2022-02-06T15:56:45.9960883Z src/simutrans/network/network.cc:340:7: note: suggested alternative: 'socket'
2022-02-06T15:56:45.9961277Z        closesocket(my_client_socket);
2022-02-06T15:56:45.9961535Z        ^~~~~~~~~~~
2022-02-06T15:56:45.9961739Z        socket
2022-02-06T15:56:45.9962204Z src/simutrans/network/network.cc:354:29: error: 'O_BLOCK' was not declared in this scope
2022-02-06T15:56:45.9962570Z       fcntl(sockfd, F_SETFL, O_BLOCK);
2022-02-06T15:56:45.9962829Z                              ^~~~~~~
2022-02-06T15:56:45.9971731Z src/simutrans/network/network.cc:354:29: note: suggested alternative: 'F_LOCK'
2022-02-06T15:56:45.9972055Z       fcntl(sockfd, F_SETFL, O_BLOCK);
2022-02-06T15:56:45.9972301Z                              ^~~~~~~
2022-02-06T15:56:45.9972506Z                              F_LOCK
2022-02-06T15:56:46.0034294Z src/simutrans/network/network.cc: In function 'bool prepare_for_server(char*, char*, int)':
2022-02-06T15:56:46.0035249Z src/simutrans/network/network.cc:1051:82: warning: unused parameter 'port' [-Wunused-parameter]
2022-02-06T15:56:46.0035767Z  bool prepare_for_server(char* externalIPAddress, char* externalAltIPAddress, int port)
2022-02-06T15:56:46.0036150Z                                                                                   ^~~~
2022-02-06T15:56:46.0605887Z make: *** [build/default/src/simutrans/network/network.o] Error 1
2022-02-06T15:56:46.0606717Z common.mk:50: recipe for target 'build/default/src/simutrans/network/network.o' failed
2022-02-06T15:56:46.0630688Z ##[error]Process completed with exit code 2.
...

Dwachs

should compile again with r10465.

However, network mode seems to be broken. I cannot get server list from list server
Parsley, sage, rosemary, and maggikraut.


prissi

Well, at home on my Laptop I do not have a Linux to test, sorry. Was just copying from StackOverflow.

Now works on Linux as well.