[MPlayer-dev-eng] [PATCH] Startup crash on sparc64
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Sat Sep 4 13:48:23 CEST 2004
On Saturday, 04 September 2004 at 11:08, Reimar Döffinger wrote:
[...]
> I'd suggest the attached version, but somebody should test if that works
> for gcc 2.95, as I have no idea where exactly this __attribute__ should
> be placed...
According to http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC90
it should be specified like this in structs:
struct foo { int x[2] __attribute__ ((aligned (8))); };
See attached patch.
R.
--
MPlayer RPMs maintainer: http://greysector.rangers.eu.org/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
We stand between the darkness ... and the light."
-- Delenn in Grey Council in Babylon 5:"Babylon Squared"
-------------- next part --------------
Index: m_config.h
===================================================================
RCS file: /cvsroot/mplayer/main/m_config.h,v
retrieving revision 1.5
diff -u -r1.5 m_config.h
--- m_config.h 13 Aug 2003 16:29:00 -0000 1.5
+++ m_config.h 4 Sep 2004 09:01:54 -0000
@@ -9,7 +9,9 @@
struct m_config_save_slot {
m_config_save_slot_t* prev;
int lvl;
- unsigned char data[0];
+ // we have to store other datatypes in this as well,
+ // so make sure we get properly aligned addresses
+ unsigned char data[0] __attribute__ ((aligned (8)));
};
struct m_config_option {
More information about the MPlayer-dev-eng
mailing list