python-werkzeug: bump to version 0.11.15
[buildroot-gz.git] / package / eudev / 0001-Only-use-pragma-for-ignoring-diagnostics-if-.patch
blob3046ba528b6dd7fd241120d348fc348f56d720f8
1 From dc8aa43b7b6d0cead7d8a0c1a151d289a5233a10 Mon Sep 17 00:00:00 2001
2 From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
3 Date: Wed, 2 Apr 2014 12:36:52 +0200
4 Subject: [PATCH] libudev: Only use #pragma for ignoring diagnostics if GCC
5 version supports it.
7 [Peter: update for 2.1.1, fix shared_assert issue]
8 Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
9 ---
10 src/shared/macro.h | 8 +++++
11 1 file changed, 8 insertions(+)
13 diff --git a/src/shared/macro.h b/src/shared/macro.h
14 --- a/src/shared/macro.h
15 +++ b/src/shared/macro.h
16 @@ -38,6 +38,7 @@
17 #define _cleanup_(x) __attribute__((cleanup(x)))
19 /* Temporarily disable some warnings */
20 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
21 #define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \
22 _Pragma("GCC diagnostic push"); \
23 _Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"")
24 @@ -48,6 +49,13 @@
26 #define REENABLE_WARNING \
27 _Pragma("GCC diagnostic pop")
28 +#else
29 +#define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT
30 +#define DISABLE_WARNING_FORMAT_NONLITERAL
31 +#define REENABLE_WARNING
32 +/* glibc unconditionally defines this, but it needs GCC 4.6+ */
33 +#undef static_assert
34 +#endif
36 #define XCONCATENATE(x, y) x ## y
37 #define CONCATENATE(x, y) XCONCATENATE(x, y)
38 --
39 1.7.9.5