]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
build: check for gcc version independent of platform
authorNatanael Copa <ncopa@alpinelinux.org>
Tue, 4 Mar 2014 11:56:33 +0000 (11:56 +0000)
committerNatanael Copa <ncopa@alpinelinux.org>
Tue, 4 Mar 2014 12:01:59 +0000 (12:01 +0000)
Use the gcc specific __GNUC__ and __GNUC__ minor to determine gcc version
rather than using the GNU libc specific __GNUC_PREREQ.

This fixes the following compile error with musl libc:
src/descrambler/capmt.c:79:18: error: missing binary operator before token "("
 #if __GNUC_PREREQ(4, 3)
                  ^

src/descrambler/capmt.c

index 258bc2bdb7079f7d4d3c1dc14a56bc65f243213d..4793e97d83b3ecc959dfe959ecbfe05d23e50f1c 100644 (file)
@@ -74,9 +74,8 @@
 #define CW_DUMP(buf, len, format, ...) \
   printf(format, __VA_ARGS__); int j; for (j = 0; j < len; ++j) printf("%02X ", buf[j]); printf("\n");
 
-#if defined(__GNUC__) && defined(PLATFORM_LINUX)
-#include <features.h>
-#if __GNUC_PREREQ(4, 3)
+#if defined(__GNUC__) && defined(__GNUC_MINOR__)
+#if 100*__GNUC__+__GNUC_MINOR >=403
 #pragma GCC diagnostic ignored "-Warray-bounds"
 #endif
 #endif