GNOME Bugzilla – Bug 131932
Solaris compilation errors with "__attribute__ ((__packed__))"
Last modified: 2004-12-22 21:47:04 UTC
Compiling gst-plugins with forte on Solaris produces the following errors due to the following struct declaration: cc -DHAVE_CONFIG_H -I. -I. -I../.. -I/opt/gnome-2.4/include -I../../gst-libs -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -mt -I/opt/gnome-2.4/include/gstreamer-0.7 -I/opt/gnome-2.4/include/glib-2.0 -I/opt/gnome-2.4/lib/glib-2.0/include -I/opt/gnome-2.4/include/libxml2 -DGST_DISABLE_DEPRECATED -g -I/opt/gnome-2.4/include -c gstasfmux.c -KPIC -DPIC -o .libs/libgstasf_la-gstasfmux.o "asfheaders.h", line 153: syntax error before or at: ( "asfheaders.h", line 153: warning: syntax error: empty declaration ------------------------------------------- struct _asf_stream_video { guint32 width; guint32 height; guint8 unknown; guint16 size; } __attribute__ ((__packed__)); /* the packed attribute is needed to prevent this thing * from expanding 'unknown' to 16 bits */ ------------------------------------------- Commenting "__attribute__ ((__packed__))" temporarily fixes the problem. An alternative solution would be preferred.
well, it seems it just was removed from current CVS : http://freedesktop.org/cgi-bin/viewcvs.cgi/*checkout*/gstreamer/gst-plugins/ChangeLog?rev=1.195
hum, no. was removed from avidemux, not asfdemux. sorry
It can't be removed from asfdemux, gcc (and other compilers) pad the struct to the wrong size, leading to bugs in ASF parsing. See the comment in the code. Please try to come up with an alternative way to parse it. I'm open for any suggestion, as long as ASF file parsing works.
2004-01-27 Benjamin Otte <in7y118@public.uni-hamburg.de> * gst/asfdemux/asfheaders.h: * gst/asfdemux/gstasfdemux.c: * gst/asfdemux/gstasfmux.c: (gst_asfmux_put_guid), (gst_asfmux_put_string), (gst_asfmux_put_wav_header), (gst_asfmux_put_vid_header), (gst_asfmux_put_bmp_header): lot's of fixes to make data extraction simpler and get the code architecture and compiler independant. Add debugging category