[libdvdnav-devel] ifo_types.h: fix 'warning: `gcc_struct' attribute directive ignored'

KO Myung-Hun git at videolan.org
Thu Jan 29 13:37:59 CET 2015


libdvdread | branch: master | KO Myung-Hun <komh78 at gmail.com> | Thu Jan 29 17:29:03 2015 +0900| [af446d463a15fb08f95f8b84bfc89af395b6e1bc] | committer: Jean-Baptiste Kempf

ifo_types.h: fix 'warning: `gcc_struct' attribute directive ignored'

gcc_struct has been supported since gcc 3.4.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=af446d463a15fb08f95f8b84bfc89af395b6e1bc
---

 src/dvdread/ifo_types.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/dvdread/ifo_types.h b/src/dvdread/ifo_types.h
index 10bdab5..33f0346 100644
--- a/src/dvdread/ifo_types.h
+++ b/src/dvdread/ifo_types.h
@@ -32,7 +32,11 @@
 
 #if defined(__GNUC__)
 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
 #define ATTRIBUTE_PACKED __attribute__ ((packed,gcc_struct))
+#else
+#define ATTRIBUTE_PACKED __attribute__ ((packed))
+#endif
 #define PRAGMA_PACK 0
 #endif
 #endif



More information about the libdvdnav-devel mailing list