1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Description: Fix FTBFS with clang
Also fix FTBFS with GCC-5 by marking inline function with
'__attribute__ ((gnu_inline))'
Bug-Debian: http://bugs.debian.org/757263
Bug: https://sourceforge.net/p/covered/patches/2/
Forwarded: https://sourceforge.net/p/covered/patches/_discuss/thread/1bd3b877/21a7/attachment/clang-ftbfs.diff
--- a/src/lxt2_read.h
+++ b/src/lxt2_read.h
@@ -47,11 +47,15 @@
#include <zlib.h>
#endif
-#ifdef __GNUC__
-#define _LXT2_RD_INLINE inline
-#else
+#ifdef __clang__
#define _LXT2_RD_INLINE
-#endif
+#else // __clang__
+# ifdef __GNUC__
+# define _LXT2_RD_INLINE __attribute__ ((gnu_inline)) inline
+# else
+# define _LXT2_RD_INLINE
+# endif
+#endif // __clang__
#define LXT2_RDLOAD "LXTLOAD | "
|