File: clang-ftbfs.diff

package info (click to toggle)
covered 0.7.10-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,036 kB
  • sloc: ansic: 48,809; yacc: 11,650; xml: 8,838; tcl: 7,698; sh: 3,925; lex: 2,240; makefile: 362; perl: 329
file content (29 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (4)
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 | "