Package: atom4
Version: 4.1-1
Severity: serious

atom4 fails to build from source because it declares server with no
type:

g++ -pedantic -DDATADIR=\"/usr/share/games/atom4\" -O2 -Iinclude 
-Iproglib/include -c net/server.cc -o net/server.o
net/server.h:31: error: ISO C++ forbids declaration of 'server' with no type
net/server.h:31: error: expected ';' before '*' token
net/server.h:78: error: expected `)' before '*' token
net/server.cc: In member function 'void clientconn::p_requ()':
net/server.cc:69: error: 'serv' was not declared in this scope
net/server.cc: In member function 'void clientconn::p_move()':
net/server.cc:84: error: 'serv' was not declared in this scope
net/server.cc: In member function 'void clientconn::p_play()':
net/server.cc:126: error: 'serv' was not declared in this scope
net/server.cc: In member function 'void clientconn::p_who()':
net/server.cc:147: error: 'serv' was not declared in this scope
net/server.cc: In member function 'void clientconn::enter_connected_state()':
net/server.cc:212: error: 'serv' was not declared in this scope
net/server.cc: In member function 'virtual void clientconn::disconnected()':
net/server.cc:263: error: 'serv' was not declared in this scope
net/server.cc: At global scope:
net/server.cc:268: error: prototype for 'clientconn::clientconn(server*, int, 
int, char*, eventloop*, int)' does not match any in class 'clientconn'
net/server.h:28: error: candidates are: clientconn::clientconn(const 
clientconn&)
net/server.h:28: error:                 clientconn::clientconn()
net/server.cc: In constructor 'clientconn::clientconn(server*, int, int, char*, 
eventloop*, int)':
net/server.cc:269: error: class 'clientconn' does not have any field named 
'serv'
net/server.cc: In member function 'int server::new_client()':
net/server.cc:437: error: no matching function for call to 
'clientconn::clientconn(server* const, int&, int&, char*&, eventloop*&, int)'
net/server.h:28: note: candidates are: clientconn::clientconn()
net/server.h:28: note:                 clientconn::clientconn(const 
clientconn&)cons: *** [net/server.o] Error 1
cons: errors constructing net/server.o
make: *** [install] Error 2

The attached patch fixes this problem by predeclaring server as a
class.

-- 
Matt
only in patch2:
unchanged:
--- atom4-4.1.orig/net/server.h
+++ atom4-4.1/net/server.h
@@ -24,6 +24,7 @@
 #define MAX_CLIENTS            12      // NOTE: must be < FD_SETSIZE
 #define SERVER_BACKLOG         2       // socket backlog limit
 
+class server;
 
 class clientconn : public netconn {
   friend class server;

Attachment: signature.asc
Description: Digital signature

Reply via email to