[Patch] xine-lib: fix build with gcc older than 4.5
Xavier Bachelot <[email protected]> Thu, 16 May 2019 17:03:45 +0200
| Newsgroups | gmane.comp.video.xine.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Latest xine-lib snapshot was not building on RHEL/CentOS 6 which ships with the ancient gcc 4.4.7. The attached path fixes the build. Regards, Xavier _______________________________________________ xine-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xine-devel
xine-lib-1.2.9-fix_build_with_gcc_older_than_45.patch
(text/x-patch, 1.1 KB)
# HG changeset patch # User Xavier Bachelot <[email protected]> # Date 1558018636 -7200 # Thu May 16 16:57:16 2019 +0200 # Node ID d0853afb06ab3fa2b6bdf3137b8c70ec1661f4cc # Parent 673f6f42def382d02c6b75cfbce030f52e1bdaae Fix build with gcc older than 4.5 The optional string argument to deprecated attribute was added in gcc 4.5. diff -r 673f6f42def3 -r d0853afb06ab include/xine/attributes.h --- a/include/xine/attributes.h Thu May 16 10:34:09 2019 +0200 +++ b/include/xine/attributes.h Thu May 16 16:57:16 2019 +0200 @@ -85,8 +85,10 @@ # define XINE_DEPRECATED #endif -#if defined(SUPPORT_ATTRIBUTE_DEPRECATED) && (!defined(XINE_LIBRARY_COMPILE)) +#if defined(SUPPORT_ATTRIBUTE_DEPRECATED) && (!defined(XINE_LIBRARY_COMPILE)) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5 )) # define XINE_PRIVATE_FIELD __attribute__((__deprecated__("this is xine-engine private field"))) +#elif defined(SUPPORT_ATTRIBUTE_DEPRECATED) && (!defined(XINE_LIBRARY_COMPILE)) +# define XINE_PRIVATE_FIELD __attribute__((__deprecated__)) #else # define XINE_PRIVATE_FIELD #endif