Author: alfie
Date: 2008-04-08 16:15:00 +0000 (Tue, 08 Apr 2008)
New Revision: 6498

Added:
   packages/trunk/wesnoth/debian/patches/05address-align-for-sparc
Modified:
   packages/trunk/wesnoth/debian/changelog
   packages/trunk/wesnoth/debian/patches/series
Log:
 * New patch: address-align-for-sparc which fixes an alignment issue which
   caused a SIGBUGS on sparc (closes: #426318)


Modified: packages/trunk/wesnoth/debian/changelog
===================================================================
--- packages/trunk/wesnoth/debian/changelog     2008-04-08 14:59:32 UTC (rev 
6497)
+++ packages/trunk/wesnoth/debian/changelog     2008-04-08 16:15:00 UTC (rev 
6498)
@@ -3,6 +3,8 @@
   * New upstream release:
     - sample.py-fix made it into the 1.4 branch, removed.
     - disable-rpath patch not needed anymore, configure fixed upstream.
+  * New patch: address-align-for-sparc which fixes an alignment issue which
+    caused a SIGBUGS on sparc (closes: #426318)
   * Update debian/copyright with respect to that wesnoth is GPLv2 or later,
     not GPLv2 only.
   * Also symlink the english manpage for wesnoth-smallgui properly.
@@ -13,7 +15,7 @@
     campaign packages.
   * Fix a typo in wesnoth-tools package description.
 
- -- Gerfried Fuchs <[EMAIL PROTECTED]>  Tue, 08 Apr 2008 16:58:38 +0200
+ -- Gerfried Fuchs <[EMAIL PROTECTED]>  Tue, 08 Apr 2008 18:12:45 +0200
 
 wesnoth (1:1.4-2) experimental; urgency=low
 

Added: packages/trunk/wesnoth/debian/patches/05address-align-for-sparc
===================================================================
--- packages/trunk/wesnoth/debian/patches/05address-align-for-sparc             
                (rev 0)
+++ packages/trunk/wesnoth/debian/patches/05address-align-for-sparc     
2008-04-08 16:15:00 UTC (rev 6498)
@@ -0,0 +1,23 @@
+Author: Mark de Wever <[EMAIL PROTECTED]>      vim:ft=diff:
+Description: Fixed an alignement issue which caused a SIGBUS on a Sparc 
(debian bug #426318).
+
+Index: wesnoth-1.4.1/src/network_worker.cpp
+===================================================================
+--- wesnoth-1.4.1.orig/src/network_worker.cpp
++++ wesnoth-1.4.1/src/network_worker.cpp
+@@ -366,7 +366,15 @@ static SOCKET_STATE send_buffer(TCPsocke
+ 
+ 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) {

Modified: packages/trunk/wesnoth/debian/patches/series
===================================================================
--- packages/trunk/wesnoth/debian/patches/series        2008-04-08 14:59:32 UTC 
(rev 6497)
+++ packages/trunk/wesnoth/debian/patches/series        2008-04-08 16:15:00 UTC 
(rev 6498)
@@ -1,2 +1,3 @@
 02wesnoth-nolog-desktop-file
 04no-campaign-fix
+05address-align-for-sparc


_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

Reply via email to