Rhonda reminded me I forgot to backport 2008-03-18T18:05:09Z!koraq@xs4all.nl.
Fixes a SIGBUS error on Sparc machines.
This commit is contained in:
parent
bcdebac5c8
commit
ddf4922622
2 changed files with 13 additions and 2 deletions
|
@ -1,6 +1,9 @@
|
|||
Version 1.4.2+svn:
|
||||
* language and i18n:
|
||||
* updated translations: Russian, Slovak
|
||||
* language and i18n:
|
||||
* updated translations: Russian, Slovak
|
||||
* miscellaneous and bug fixes:
|
||||
* fixed an alignement issue which caused a SIGBUS on a Sparc
|
||||
(debian bug #426318)
|
||||
|
||||
Version 1.4.2:
|
||||
* campaigns
|
||||
|
|
|
@ -366,7 +366,15 @@ static SOCKET_STATE send_buffer(TCPsocket sock, std::vector<char>& buf)
|
|||
|
||||
static SOCKET_STATE receive_buf(TCPsocket sock, std::vector<char>& buf)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
// The address needs to be aligned on a Sparc system, if it's not aligned
|
||||
// the SDLNet_Read32 call will cause a SIGBUS and the server will be
|
||||
// terminated.
|
||||
// http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426318
|
||||
char num_buf[4] __attribute__ ((aligned (4)));
|
||||
#else
|
||||
char num_buf[4];
|
||||
#endif
|
||||
bool res = receive_with_timeout(sock,num_buf,4,false);
|
||||
|
||||
if(!res) {
|
||||
|
|
Loading…
Add table
Reference in a new issue